Skip to content

Commit 0bcf04f

Browse files
committed
Merge pull request #6153
8c35b6f Parameter interaction: disable upnp if -proxy set (Wladimir J. van der Laan)
2 parents df992b9 + 8c35b6f commit 0bcf04f

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
@@ -667,6 +667,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
667667
// to protect privacy, do not listen by default if a default proxy server is specified
668668
if (SoftSetBoolArg("-listen", false))
669669
LogPrintf("%s: parameter interaction: -proxy set -> setting -listen=0\n", __func__);
670+
// to protect privacy, do not use UPNP when a proxy is set. The user may still specify -listen=1
671+
// to listen locally, so don't rely on this happening through -listen below.
672+
if (SoftSetBoolArg("-upnp", false))
673+
LogPrintf("%s: parameter interaction: -proxy set -> setting -upnp=0\n", __func__);
670674
// to protect privacy, do not discover addresses by default
671675
if (SoftSetBoolArg("-discover", false))
672676
LogPrintf("%s: parameter interaction: -proxy set -> setting -discover=0\n", __func__);

0 commit comments

Comments
 (0)