mirror of https://github.com/bitcoin/bitcoin
gui: Add NAT-PMP network option
This commit is contained in:
parent
a39f7336a3
commit
5a0185b6c9
|
@ -259,6 +259,16 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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&T-PMP</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="allowIncoming">
|
<widget class="QCheckBox" name="allowIncoming">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
|
|
@ -50,6 +50,9 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
|
||||||
/* Network elements init */
|
/* Network elements init */
|
||||||
#ifndef USE_UPNP
|
#ifndef USE_UPNP
|
||||||
ui->mapPortUpnp->setEnabled(false);
|
ui->mapPortUpnp->setEnabled(false);
|
||||||
|
#endif
|
||||||
|
#ifndef USE_NATPMP
|
||||||
|
ui->mapPortNatpmp->setEnabled(false);
|
||||||
#endif
|
#endif
|
||||||
connect(this, &QDialog::accepted, [this](){
|
connect(this, &QDialog::accepted, [this](){
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
@ -219,6 +222,7 @@ void OptionsDialog::setMapper()
|
||||||
|
|
||||||
/* Network */
|
/* Network */
|
||||||
mapper->addMapping(ui->mapPortUpnp, OptionsModel::MapPortUPnP);
|
mapper->addMapping(ui->mapPortUpnp, OptionsModel::MapPortUPnP);
|
||||||
|
mapper->addMapping(ui->mapPortNatpmp, OptionsModel::MapPortNatpmp);
|
||||||
mapper->addMapping(ui->allowIncoming, OptionsModel::Listen);
|
mapper->addMapping(ui->allowIncoming, OptionsModel::Listen);
|
||||||
|
|
||||||
mapper->addMapping(ui->connectSocks, OptionsModel::ProxyUse);
|
mapper->addMapping(ui->connectSocks, OptionsModel::ProxyUse);
|
||||||
|
|
Loading…
Reference in New Issue