Finally a seemingly proper patch for UPnP Port Mapping. Note that this one still does not have proper support in the makefiles for anything but UNIX.
UPnP #114
pull TheBlueMatt wants to merge 0 commits into bitcoin:master from TheBlueMatt:upnp changing 0 files +0 −0-
TheBlueMatt commented at 11:00 PM on March 11, 2011: member
-
gavinandresen commented at 11:25 PM on March 11, 2011: contributor
Cool! Thanks for being persistent.
Two comments:
The appropriate copyright notice should be added to uiproject.fbp and uibase.cpp; I think building the next release with UpNP support compiled in would be a good idea.
Having both -noupnp and -upnp options (and tri-state USE_UPNP) is confusing and will cause problems if bitcoin.conf files are copied around. I'd suggest something like (assuming we want upnp on by default for Windows):
bool fUseUpnp = GetBoolArg("-upnp"); #ifdef _WINDOWS if (mapArgs.count("-upnp") == 0) fUseUpnp = true; // upnp on if not explicitly turned off #endif -
TheBlueMatt commented at 11:43 PM on March 11, 2011: member
Didn't realize Luke added -upnp in his commit, sorry. The original intention was to have USE_UPNP as a compile option as to whether or not one would compile with UPnP or not and a single -noupnp where UPnP defaults to on.
Currently the Windows makefile doesn't support any UPnP (some have suggested using Window's native UPnP library instead on Windows). I think it should be always on by default. In the end that can only be better for the network as it creates more peer diversity (and maybe eventually increasing MAX_OUTBOUND_CONNECTIONS). I will do that unless you disagree. -
gavinandresen commented at 12:53 AM on March 12, 2011: contributor
Please start a discussion on the forums about whether or not UpNP should be on or off by default; I think you will find strong feelings that it should be off by default among Linux folks.
-
TheBlueMatt commented at 1:07 AM on March 12, 2011: member
Forum thread here: http://www.bitcoin.org/smf/index.php?topic=4392.0
-
jgarzik commented at 8:36 PM on March 15, 2011: contributor
Consensus seems to be "off by default"
-
TheBlueMatt commented at 12:46 PM on March 16, 2011: member
That's the interesting thing about UPnP, for an individual, having UPnP on by default is bad - potential security problems down the line, increased traffic, etc. For the network as a whole, having UPnP on by default is good as it creates more nodes which accept incoming connections ie good for network diversity in the long run. (maybe even increased MAX_OUTBOUND_CONNECTIONS in the future)
- TheBlueMatt merged this on Mar 21, 2011
- TheBlueMatt closed this on Mar 21, 2011
- glv2 referenced this in commit cd5499bddd on Sep 7, 2014
- sipa referenced this in commit a064934ec0 on Dec 4, 2014
- sipa referenced this in commit 87bddb7a3a on Dec 4, 2014
- sipa referenced this in commit eb6347679b on Dec 5, 2014
- dexX7 referenced this in commit 78fcd285d4 on Jul 6, 2015
- deadalnix referenced this in commit 9d64145781 on Jan 19, 2017
- classesjack referenced this in commit 215d0c7eae on Jan 2, 2018
- 0xartem referenced this in commit 0abb43c93a on Feb 4, 2018
- cryptapus referenced this in commit 7dfac65120 on Oct 2, 2018
- lateminer referenced this in commit 7dfc759668 on Feb 23, 2019
- attilaaf referenced this in commit b071cc3eca on Jan 13, 2020
- rajarshimaitra referenced this in commit 0ffeb48686 on Aug 5, 2021
- DrahtBot locked this on Sep 8, 2021