mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-08 22:55:16 +01:00
net: Replace libnatpmp with built-in NATPMP+PCP implementation in mapport
This commit is contained in:
@@ -571,11 +571,7 @@ void SetupServerArgs(ArgsManager& argsman, bool can_listen_ipc)
|
||||
#else
|
||||
hidden_args.emplace_back("-upnp");
|
||||
#endif
|
||||
#ifdef USE_NATPMP
|
||||
argsman.AddArg("-natpmp", strprintf("Use NAT-PMP to map the listening port (default: %u)", DEFAULT_NATPMP), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
|
||||
#else
|
||||
hidden_args.emplace_back("-natpmp");
|
||||
#endif // USE_NATPMP
|
||||
argsman.AddArg("-natpmp", strprintf("Use PCP or NAT-PMP to map the listening port (default: %u)", DEFAULT_NATPMP), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
|
||||
argsman.AddArg("-whitebind=<[permissions@]addr>", "Bind to the given address and add permission flags to the peers connecting to it. "
|
||||
"Use [host]:port notation for IPv6. Allowed permissions: " + Join(NET_PERMISSIONS_DOC, ", ") + ". "
|
||||
"Specify multiple permissions separated by commas (default: download,noban,mempool,relay). Can be specified multiple times.", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
|
||||
@@ -1858,7 +1854,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
||||
LogPrintf("nBestHeight = %d\n", chain_active_height);
|
||||
if (node.peerman) node.peerman->SetBestBlock(chain_active_height, std::chrono::seconds{best_block_time});
|
||||
|
||||
// Map ports with UPnP or NAT-PMP.
|
||||
// Map ports with UPnP or NAT-PMP
|
||||
StartMapPort(args.GetBoolArg("-upnp", DEFAULT_UPNP), args.GetBoolArg("-natpmp", DEFAULT_NATPMP));
|
||||
|
||||
CConnman::Options connOptions;
|
||||
|
||||
Reference in New Issue
Block a user