From 812f5045b06e667fa45a738d4b914e4d17d32c21 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 13 Jul 2016 11:12:51 -0400 Subject: [PATCH] enable UPnP for windows and android by default --- Config.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Config.cpp b/Config.cpp index 28cb5223..10330c34 100644 --- a/Config.cpp +++ b/Config.cpp @@ -31,6 +31,7 @@ namespace config { #ifdef MESHNET nat = false; #endif + options_description general("General options"); general.add_options() ("help", "Show this message") @@ -126,9 +127,13 @@ namespace config { ("i2pcontrol.key", value()->default_value("i2pcontrol.key.pem"), "I2PCP connection cerificate key") ; - options_description upnp("UPnP options"); - upnp.add_options() - ("upnp.enabled", value()->default_value(false), "Enable or disable UPnP: automatic port forwarding") + bool upnp_default = false; +#if (defined(USE_UPNP) && ((defined(WIN32) && defined(USE_WIN32_APP)) || defined(ANDROID))) + upnp_default = true; // enable UPNP for windows GUI and android by default +#endif + options_description upnp("UPnP options"); + upnp.add_options() + ("upnp.enabled", value()->default_value(upnp_default), "Enable or disable UPnP: automatic port forwarding") ; options_description precomputation("Precomputation options");