File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -454,20 +454,24 @@ void OptionsDialog::updateProxyValidationState()
454
454
455
455
void OptionsDialog::updateDefaultProxyNets ()
456
456
{
457
- const std::optional<CNetAddr> ui_proxy_netaddr{LookupHost (ui->proxyIp ->text ().toStdString (), /* fAllowLookup=*/ false )};
458
- const CService ui_proxy{ui_proxy_netaddr.value_or (CNetAddr{}), ui->proxyPort ->text ().toUShort ()};
457
+ std::string proxyIpText{ui->proxyIp ->text ().toStdString ()};
458
+ if (!IsUnixSocketPath (proxyIpText)) {
459
+ const std::optional<CNetAddr> ui_proxy_netaddr{LookupHost (proxyIpText, /* fAllowLookup=*/ false )};
460
+ const CService ui_proxy{ui_proxy_netaddr.value_or (CNetAddr{}), ui->proxyPort ->text ().toUShort ()};
461
+ proxyIpText = ui_proxy.ToStringAddrPort ();
462
+ }
459
463
460
464
Proxy proxy;
461
465
bool has_proxy;
462
466
463
467
has_proxy = model->node ().getProxy (NET_IPV4, proxy);
464
- ui->proxyReachIPv4 ->setChecked (has_proxy && proxy.proxy == ui_proxy );
468
+ ui->proxyReachIPv4 ->setChecked (has_proxy && proxy.ToString () == proxyIpText );
465
469
466
470
has_proxy = model->node ().getProxy (NET_IPV6, proxy);
467
- ui->proxyReachIPv6 ->setChecked (has_proxy && proxy.proxy == ui_proxy );
471
+ ui->proxyReachIPv6 ->setChecked (has_proxy && proxy.ToString () == proxyIpText );
468
472
469
473
has_proxy = model->node ().getProxy (NET_ONION, proxy);
470
- ui->proxyReachTor ->setChecked (has_proxy && proxy.proxy == ui_proxy );
474
+ ui->proxyReachTor ->setChecked (has_proxy && proxy.ToString () == proxyIpText );
471
475
}
472
476
473
477
ProxyAddressValidator::ProxyAddressValidator (QObject *parent) :
You can’t perform that action at this time.
0 commit comments