aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-05-18 11:21:32 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-05-18 11:22:39 +0200
commit8c35b6f3be218101630101806300cfd75be23f58 (patch)
treefe395eb5f4d0c8f53a77fc470164e900d1e8144a /src
parent26e08a16a6fb64b535d10f5d459183092deefa50 (diff)
Parameter interaction: disable upnp if -proxy set
To protect privacy, do not use UPNP when a proxy is set. The user may still specify -listen=1 to listen locally (for a hidden service), so don't rely on this happening through -listen. Fixes #2927.
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 490ed6f54c..d0ce3094a5 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -661,6 +661,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// to protect privacy, do not listen by default if a default proxy server is specified
if (SoftSetBoolArg("-listen", false))
LogPrintf("%s: parameter interaction: -proxy set -> setting -listen=0\n", __func__);
+ // to protect privacy, do not use UPNP when a proxy is set. The user may still specify -listen=1
+ // to listen locally, so don't rely on this happening through -listen below.
+ if (SoftSetBoolArg("-upnp", false))
+ LogPrintf("%s: parameter interaction: -proxy set -> setting -upnp=0\n", __func__);
// to protect privacy, do not discover addresses by default
if (SoftSetBoolArg("-discover", false))
LogPrintf("%s: parameter interaction: -proxy set -> setting -discover=0\n", __func__);