node-spdyproxy icon indicating copy to clipboard operation
node-spdyproxy copied to clipboard

bind to interface

Open cannotcode opened this issue 10 years ago • 2 comments

Hello,

Running spdyproxy daemon with the option "--localAddress" doesn't work. It will bind to 0.0.0.0. I've tried with "--localAddress lo", "--localAddress eth1:1" (virtual).

cannotcode avatar Dec 09 '14 11:12 cannotcode

Current option enables binding to a particular IP for outgoing requests, the server by default listens on all interfaces. I think that's a simple improvement though: https://github.com/igrigorik/node-spdyproxy/blob/master/bin/spdyproxy#L129 ... just need to provide the localAddress option to listen() [1].

[1] http://nodejs.org/api/http.html#http_server_listen_port_hostname_backlog_callback

igrigorik avatar Dec 09 '14 15:12 igrigorik

Thanks. I got it to work with changing it as suggested to proxy.listen(opts.port,'[ip address]');

cannotcode avatar Dec 10 '14 08:12 cannotcode