]> Git Repo - VerusCoin.git/commitdiff
Parameter interaction: disable upnp if -proxy set
authorWladimir J. van der Laan <[email protected]>
Mon, 18 May 2015 09:21:32 +0000 (11:21 +0200)
committerWladimir J. van der Laan <[email protected]>
Mon, 18 May 2015 09:22:39 +0000 (11:22 +0200)
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.

src/init.cpp

index 490ed6f54c814bbc11b9b6bf3c75a69d4ac3479e..d0ce3094a5fb284be69abde900f1c3f358de1aa8 100644 (file)
@@ -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__);
This page took 0.02804 seconds and 4 git commands to generate.