diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-06-24 17:38:43 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-06-24 17:51:32 +0200 |
commit | 0410d11b3a2b1ff146366165f715a3e11f4cace7 (patch) | |
tree | 9328098ff29ae8baf97ffad1454f054e98381455 | |
parent | 5dd0bfefcb11d8962c87952a9b6a4d11774802bf (diff) | |
parent | 1c750dbd40e23be1f17cf74cd73041a1050dc98d (diff) |
Merge pull request #4130
1c750db remove -tor compatibility code (only allow -onion) (Philip Kaufmann)
-rw-r--r-- | src/init.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/init.cpp b/src/init.cpp index 7ef3bc5dac..a03629d07a 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -561,6 +561,9 @@ bool AppInit2(boost::thread_group& threadGroup) // Check for -debugnet (deprecated) if (GetBoolArg("-debugnet", false)) InitWarning(_("Warning: Deprecated argument -debugnet ignored, use -debug=net")); + // Check for -tor - as this is a privacy risk to continue, exit here + if (GetBoolArg("-tor", false)) + return InitError(_("Error: Unsupported argument -tor found, use -onion.")); fBenchmark = GetBoolArg("-benchmark", false); // Checkmempool defaults to true in regtest mode @@ -767,19 +770,15 @@ bool AppInit2(boost::thread_group& threadGroup) } // -onion can override normal proxy, -noonion disables tor entirely - // -tor here is a temporary backwards compatibility measure - if (mapArgs.count("-tor")) - printf("Notice: option -tor has been replaced with -onion and will be removed in a later version.\n"); if (!(mapArgs.count("-onion") && mapArgs["-onion"] == "0") && - !(mapArgs.count("-tor") && mapArgs["-tor"] == "0") && - (fProxy || mapArgs.count("-onion") || mapArgs.count("-tor"))) { + (fProxy || mapArgs.count("-onion"))) { CService addrOnion; - if (!mapArgs.count("-onion") && !mapArgs.count("-tor")) + if (!mapArgs.count("-onion")) addrOnion = addrProxy; else - addrOnion = mapArgs.count("-onion")?CService(mapArgs["-onion"], 9050):CService(mapArgs["-tor"], 9050); + addrOnion = CService(mapArgs["-onion"], 9050); if (!addrOnion.IsValid()) - return InitError(strprintf(_("Invalid -onion address: '%s'"), mapArgs.count("-onion")?mapArgs["-onion"]:mapArgs["-tor"])); + return InitError(strprintf(_("Invalid -onion address: '%s'"), mapArgs["-onion"])); SetProxy(NET_TOR, addrOnion, 5); SetReachable(NET_TOR); } |