It's really a niche use case.

I'm "proxying" http, tcp, and udp over http behind a firewall.

Basically I'm telling the "proxy" to give me an ip address, port where I
can tell another service to send data and a uuid by which I can access the
message queue.

I then tell the other service to send its data to that ip address and port.

I then use http get and the uuid to get a list of messages in the queue,
download them via http get.

The ip of the "proxy" isn't likely to change, so I could hard code it, but
I thought it would be nice to have it know what its address is.

AJ ONeal


On Sat, Feb 11, 2012 at 12:19 PM, Avi Deitcher <[email protected]> wrote:

> Now I am confused. You have a proxy server written in node, so you want to
> know the IP it came in on?
>
>
> On Sat, Feb 11, 2012 at 7:51 AM, AJ ONeal <[email protected]> wrote:
>
>> No, it's a proxy-ish server that dynamically starts other servers for
>> testing and closes them when the test is finished.
>>
>> I wanted to tell the client the IP address of the server with the
>> assumption that usually it's the same IP as the proxy, but could be
>> different.
>>
>> Sent from my Android
>> On Feb 8, 2012 6:06 AM, "deitch" <[email protected]> wrote:
>>
>>> Chances are you have a Web server fronting your requests (Apache/
>>> Nginx), which has the actual IP the request came in on (LOL I just
>>> wrote "the actual request the IP came in on" before I fixed it; get
>>> *that* auto-correct).
>>>
>>> The http headers (especially if passed on) will include the hostname,
>>> will they also include the request IP? You could probably configure
>>> your front-end server (Apache or Nginx) to add it as an http header in
>>> the request to the node app server, and then pull it from
>>> request.headers, if it really matters.
>>>
>>> The more interesting question might be why you are doing this in the
>>> first place? If this is a classic Web app, you shouldn't need it
>>> inside your app, and might make it brittle. If it is some type of
>>> other networking service, I can see how it might be needed. But why do
>>> you need it, and is there a better solution?
>>>
>>> On Feb 6, 9:04 pm, Ben Noordhuis <[email protected]> wrote:
>>> > On Mon, Feb 6, 2012 at 19:15, AJ ONeal <[email protected]> wrote:
>>> > > Can someone suggest a strategy for determining which IP address a
>>> request
>>> > > came through?
>>> >
>>> > > I'm not looking for the IP address of the remote.
>>> >
>>> > > I want the IP address of the server.
>>> >
>>> > You mean the address the connection came in on a server with multiple
>>> addresses?
>>> >
>>> > You can't. It's not a Node limitation, most (all?) operating systems
>>> > don't provide that information. Bind to each address separately.
>>>
>>> --
>>> Job Board: http://jobs.nodejs.org/
>>> Posting guidelines:
>>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>>> You received this message because you are subscribed to the Google
>>> Groups "nodejs" group.
>>> To post to this group, send email to [email protected]
>>> To unsubscribe from this group, send email to
>>> [email protected]
>>> For more options, visit this group at
>>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>>
>>  --
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines:
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>
>
>
>  --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to