gui: Add NAT-PMP network option

This commit is contained in:
Hennadii Stepanov committed 2021-01-07 18:07:10 +02:00
1 parent a39f7336a3
commit 5a0185b6c9
2 files changed
+14

No files matched your search

+10
View File
@@ -259,6 +259,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="mapPortNatpmp">
<property name="toolTip">
<string>Automatically open the Bitcoin client port on the router. This only works when your router supports NAT-PMP and it is enabled. The external port could be random.</string>
</property>
<property name="text">
<string>Map port using NA&amp;T-PMP</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="allowIncoming">
<property name="toolTip">
+4
View File
@@ -50,6 +50,9 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
/* 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;
@@ -219,6 +222,7 @@ void OptionsDialog::setMapper()
/* 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);