@@ -1199,6 +1199,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
11991199 // -proxy sets a proxy for all outgoing network traffic
12001200 // -noproxy (or -proxy=0) as well as the empty string can be used to not set a proxy, this is the default
12011201 std::string proxyArg = GetArg (" -proxy" , " " );
1202+ SetLimited (NET_TOR);
12021203 if (proxyArg != " " && proxyArg != " 0" ) {
12031204 proxyType addrProxy = proxyType (CService (proxyArg, 9050 ), proxyRandomize);
12041205 if (!addrProxy.IsValid ())
@@ -1208,7 +1209,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
12081209 SetProxy (NET_IPV6, addrProxy);
12091210 SetProxy (NET_TOR, addrProxy);
12101211 SetNameProxy (addrProxy);
1211- SetReachable (NET_TOR); // by default, -proxy sets onion as reachable, unless -noonion later
1212+ SetLimited (NET_TOR, false ); // by default, -proxy sets onion as reachable, unless -noonion later
12121213 }
12131214
12141215 // -onion can be used to set only a proxy for .onion, or override normal proxy for .onion addresses
@@ -1217,13 +1218,13 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
12171218 std::string onionArg = GetArg (" -onion" , " " );
12181219 if (onionArg != " " ) {
12191220 if (onionArg == " 0" ) { // Handle -noonion/-onion=0
1220- SetReachable (NET_TOR, false ); // set onions as unreachable
1221+ SetLimited (NET_TOR); // set onions as unreachable
12211222 } else {
12221223 proxyType addrOnion = proxyType (CService (onionArg, 9050 ), proxyRandomize);
12231224 if (!addrOnion.IsValid ())
12241225 return InitError (strprintf (_ (" Invalid -onion address: '%s'" ), onionArg));
12251226 SetProxy (NET_TOR, addrOnion);
1226- SetReachable (NET_TOR);
1227+ SetLimited (NET_TOR, false );
12271228 }
12281229 }
12291230
0 commit comments