Add "No Proxy" option to proxy settings

This commit is contained in:
Bart De Vries
2024-04-24 22:26:12 +02:00
committed by Tobias Fella
parent cae389c04c
commit d79d806cda
3 changed files with 15 additions and 0 deletions

View File

@@ -136,6 +136,9 @@
<choice name="Socks5">
<label>Socks5</label>
</choice>
<choice name="NoProxy">
<label>NoProxy</label>
</choice>
<default>System</default>
</choices>
</entry>

View File

@@ -30,6 +30,10 @@ void ProxyController::setApplicationProxy()
proxy.setPassword(cfg->proxyPassword());
QNetworkProxy::setApplicationProxy(proxy);
break;
case 3:
proxy.setType(QNetworkProxy::NoProxy);
QNetworkProxy::setApplicationProxy(proxy);
break;
default:
QNetworkProxyFactory::setUseSystemConfiguration(true);
break;

View File

@@ -29,6 +29,14 @@ FormCard.FormCardPage {
currentType = 0;
}
}
FormCard.FormRadioDelegate {
text: i18n("No Proxy")
checked: currentType === 3
enabled: !Config.isProxyTypeImmutable
onToggled: {
currentType = 3;
}
}
FormCard.FormRadioDelegate {
text: i18n("HTTP")
checked: currentType === 1