@@ -1175,6 +1175,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
11751175 // -proxy sets a proxy for all outgoing network traffic
11761176 // -noproxy (or -proxy=0) as well as the empty string can be used to not set a proxy, this is the default
11771177 std::string proxyArg = GetArg (" -proxy" , " " );
1178+ SetLimited (NET_TOR);
11781179 if (proxyArg != " " && proxyArg != " 0" ) {
11791180 proxyType addrProxy = proxyType (CService (proxyArg, 9050 ), proxyRandomize);
11801181 if (!addrProxy.IsValid ())
@@ -1184,7 +1185,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
11841185 SetProxy (NET_IPV6, addrProxy);
11851186 SetProxy (NET_TOR, addrProxy);
11861187 SetNameProxy (addrProxy);
1187- SetReachable (NET_TOR); // by default, -proxy sets onion as reachable, unless -noonion later
1188+ SetLimited (NET_TOR, false ); // by default, -proxy sets onion as reachable, unless -noonion later
11881189 }
11891190
11901191 // -onion can be used to set only a proxy for .onion, or override normal proxy for .onion addresses
@@ -1193,13 +1194,13 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
11931194 std::string onionArg = GetArg (" -onion" , " " );
11941195 if (onionArg != " " ) {
11951196 if (onionArg == " 0" ) { // Handle -noonion/-onion=0
1196- SetReachable (NET_TOR, false ); // set onions as unreachable
1197+ SetLimited (NET_TOR); // set onions as unreachable
11971198 } else {
11981199 proxyType addrOnion = proxyType (CService (onionArg, 9050 ), proxyRandomize);
11991200 if (!addrOnion.IsValid ())
12001201 return InitError (strprintf (_ (" Invalid -onion address: '%s'" ), onionArg));
12011202 SetProxy (NET_TOR, addrOnion);
1202- SetReachable (NET_TOR);
1203+ SetLimited (NET_TOR, false );
12031204 }
12041205 }
12051206
0 commit comments