diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-11-08 16:10:38 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-11-30 11:55:44 -0500 |
commit | 5f0a8dcd2cfcbafc3deb3a6717808b607a459dac (patch) | |
tree | cab98ff453a2116811274dd2118e61290aadd514 /src/or/transports.c | |
parent | 628b735fe39e13cc37afb567b32d4b006da51c89 (diff) | |
download | tor-5f0a8dcd2cfcbafc3deb3a6717808b607a459dac.tar.gz tor-5f0a8dcd2cfcbafc3deb3a6717808b607a459dac.zip |
Initial hacking for proposal 186.
This code handles the new ORPort options, and incidentally makes all
remaining port types use the new port configuration systems.
There are some rough edges! It doesn't do well in the case where your
Address says one thing but you say to Advertise another ORPort. It
doesn't handle AllAddrs. It doesn't actually advertise anything besides
the first listed advertised IPv4 ORPort and DirPort. It doesn't do
port forwarding to them either.
It's not tested either, it needs more documentation, and it probably
forgets to put the milk back in the refrigerator.
Diffstat (limited to 'src/or/transports.c')
-rw-r--r-- | src/or/transports.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/transports.c b/src/or/transports.c index 10155c4475..eaaf1a3bfb 100644 --- a/src/or/transports.c +++ b/src/or/transports.c @@ -12,6 +12,7 @@ #include "circuitbuild.h" #include "transports.h" #include "util.h" +#include "router.h" #ifdef MS_WINDOWS static void set_managed_proxy_environment(LPVOID *envp, @@ -1079,7 +1080,8 @@ set_managed_proxy_environment(char ***envp, const managed_proxy_t *mp) bindaddr = get_bindaddr_for_proxy(mp); /* XXX temp */ - tor_asprintf(tmp++, "TOR_PT_ORPORT=127.0.0.1:%d", options->ORPort); + tor_asprintf(tmp++, "TOR_PT_ORPORT=127.0.0.1:%d", + router_get_advertised_or_port(options)); tor_asprintf(tmp++, "TOR_PT_SERVER_BINDADDR=%s", bindaddr); tor_asprintf(tmp++, "TOR_PT_SERVER_TRANSPORTS=%s", transports_to_launch); /* XXX temp*/ |