Skip to content

Commit 8c35b6f

Browse files
committed
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.
1 parent 26e08a1 commit 8c35b6f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/init.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
661661
// to protect privacy, do not listen by default if a default proxy server is specified
662662
if (SoftSetBoolArg("-listen", false))
663663
LogPrintf("%s: parameter interaction: -proxy set -> setting -listen=0\n", __func__);
664+
// to protect privacy, do not use UPNP when a proxy is set. The user may still specify -listen=1
665+
// to listen locally, so don't rely on this happening through -listen below.
666+
if (SoftSetBoolArg("-upnp", false))
667+
LogPrintf("%s: parameter interaction: -proxy set -> setting -upnp=0\n", __func__);
664668
// to protect privacy, do not discover addresses by default
665669
if (SoftSetBoolArg("-discover", false))
666670
LogPrintf("%s: parameter interaction: -proxy set -> setting -discover=0\n", __func__);

0 commit comments

Comments
 (0)