mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
gui: Add NAT-PMP network option
This commit is contained in:
parent
a39f7336a3
commit
5a0185b6c9
2 changed files with 14 additions and 0 deletions
|
@ -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&T-PMP</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="allowIncoming">
|
||||
<property name="toolTip">
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue