436@@ -437,16 +437,17 @@ void SetupServerArgs()
437 gArgs.AddArg("-torpassword=<pass>", "Tor control port password (default: empty)", false, OptionsCategory::CONNECTION);
438 #ifdef USE_UPNP
439 #if USE_UPNP
440- gArgs.AddArg("-upnp", "Use UPnP to map the listening port (default: 1 when listening and no -proxy)", false, OptionsCategory::CONNECTION);
441+ gArgs.AddArg("-portmap", "Use UPnP to map the listening port (default: 1 when listening and no -proxy)", false, OptionsCategory::CONNECTION);
442 #else
443- gArgs.AddArg("-upnp", strprintf("Use UPnP to map the listening port (default: %u)", 0), false, OptionsCategory::CONNECTION);
444+ gArgs.AddArg("-portmap", strprintf("Use NAT-PMP to map the listening port (default: %u)", 0), false, OptionsCategory::CONNECTION);
445 #endif
Both should be supported…
@luke-jr
I meant to use same switch “-portmap” for upnp as well as NAT-PMP. And the particular implementation is picked based on “USE_UPNP” flag (In this file as well as net.cpp). So I believe both are supported but picked based on USE_UPNP flag. Do you see any problem here?
USE_UPNP is a compile-time option, not run-time.
UPnP and NAT-PMP are two completely different protocols. They don’t do the same thing. Some routers may support only one or the other.
@laanwj @luke-jr Do you think we should introduce a separate switch for this?
Or fall back to upnp?
#11902