diff --git a/doc/release-notes.md b/doc/release-notes.md --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -5,9 +5,20 @@ This release includes the following features and fixes: + +RPC changes +----------- + - A new `total_fee` field showing the total fees for all transactions in the mempool has been added to the `getmempoolinfo` RPC. - Added a new `getavalancheproofs` RPC to retrieve all avalanche proof IDs tracked by the node. - Added a new field `immature_stake_amount` to `getavalancheinfo` to report the total amount of stake that will mature within the next 2016 blocks. + +P2P and network changes +----------------------- + + - Added NAT-PMP port mapping support via [`libnatpmp`](https://miniupnp.tuxfamily.org/libnatpmp.html). + Use the `-natpmp` command line option to use NAT-PMP to map the listening port. If both UPnP + and NAT-PMP are enabled, a successful allocation from UPnP prevails over one from NAT-PMP. diff --git a/doc/tor.md b/doc/tor.md --- a/doc/tor.md +++ b/doc/tor.md @@ -197,7 +197,7 @@ ./bitcoind ... -discover -and open port 8333 on your firewall (or use `-upnp`). +and open port 8333 on your firewall (or use port mapping, i.e., `-upnp` or `-natpmp`). If you only want to use Tor to reach .onion addresses, but not use it as a proxy for normal IPv4/IPv6 communication, use: diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui --- a/src/qt/forms/optionsdialog.ui +++ b/src/qt/forms/optionsdialog.ui @@ -259,6 +259,16 @@ + + + + Automatically open the Bitcoin ABC client port on the router. This only works when your router supports NAT-PMP and it is enabled. The external port could be random. + + + Map port using NA&T-PMP + + + diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -47,6 +47,9 @@ /* Network elements init */ #ifndef USE_UPNP ui->mapPortUpnp->setEnabled(false); +#endif +#ifndef USE_NATPMP + ui->mapPortNatpmp->setEnabled(false); #endif connect(this, &QDialog::accepted, [this]() { QSettings settings; @@ -266,6 +269,7 @@ /* Network */ mapper->addMapping(ui->mapPortUpnp, OptionsModel::MapPortUPnP); + mapper->addMapping(ui->mapPortNatpmp, OptionsModel::MapPortNatpmp); mapper->addMapping(ui->allowIncoming, OptionsModel::Listen); mapper->addMapping(ui->connectSocks, OptionsModel::ProxyUse);