Ok. For reference the current torrc.sample stanza is:
## Replace this with "SocksPort 0" if you plan to run Tor only as a## relay, and not make any local application connections yourself.SocksPort 9050 # what port to open for local application connectionsSocksListenAddress 127.0.0.1 # accept connections only from localhost#SocksListenAddress 192.168.0.1:9100 # listen on this IP:port also
What's the new behavior we want? Perhaps something like
## What address/port to open for local application connections.## Replace this with "SocksPort 0" if you plan to run Tor only as a## relay, and not make any local application connections yourself.SocksPort 9050 # binds to localhost if address isn't specified#SocksPort 192.168.0.1:9100 # listen on this IP:port also
I don't think we should have "socksport 127.0.0.1:9050" as default-on in the torrc file, because that limits us in the future about where we want it to bind. Do we want 9050 to be enabled by default in the torrc at all? It already is the default in the code -- see calls to parse_port_config().
I pushed a branch "bug5438" to my public repo that does approximately that change, and removes the rest of the *ListenAddress options for torrc.sample too. Please review?
As an addendum: we also removed the "SocksPort 9050" line, which might confuse users into thinking that Tor won't default to it. I guess we'll find out.
(It is now the case that torrc.sample has no uncommented lines.)