Don't listen if on TOR (resolves #441).
authorMatt Corallo <matt@bluematt.me>
Wed, 3 Aug 2011 19:02:37 +0000 (21:02 +0200)
committerMatt Corallo <matt@bluematt.me>
Wed, 3 Aug 2011 20:16:29 +0000 (22:16 +0200)
src/init.cpp

index 266c992..acfcc44 100644 (file)
@@ -247,7 +247,8 @@ bool AppInit2(int argc, char* argv[])
     fPrintToDebugger = GetBoolArg("-printtodebugger");
 
     fTestNet = GetBoolArg("-testnet");
-    fNoListen = GetBoolArg("-nolisten");
+    bool fTOR = (fUseProxy && addrProxy.port == htons(9050));
+    fNoListen = GetBoolArg("-nolisten") || fTOR;
     fLogTimestamps = GetBoolArg("-logtimestamps");
 
     for (int i = 1; i < argc; i++)