mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 00:33:09 -07:00
- Can have different proxy settings for bittorrent and search engine (closes #274791)
This commit is contained in:
parent
2931d51add
commit
139360cf76
60 changed files with 3322 additions and 2683 deletions
11
src/GUI.cpp
11
src/GUI.cpp
|
@ -974,15 +974,12 @@ void GUI::configureSession(bool deleteOptions) {
|
|||
proxySettings.username = options->getProxyUsername().toStdString();
|
||||
proxySettings.password = options->getProxyPassword().toStdString();
|
||||
}
|
||||
QString proxy_str;
|
||||
switch(options->getProxyType()) {
|
||||
case HTTP:
|
||||
proxySettings.type = proxy_settings::http;
|
||||
proxy_str = misc::toQString("http://")+options->getProxyIp()+":"+misc::toQString(proxySettings.port);
|
||||
break;
|
||||
case HTTP_PW:
|
||||
proxySettings.type = proxy_settings::http_pw;
|
||||
proxy_str = misc::toQString("http://")+options->getProxyUsername()+":"+options->getProxyPassword()+"@"+options->getProxyIp()+":"+misc::toQString(proxySettings.port);
|
||||
break;
|
||||
case SOCKS5:
|
||||
proxySettings.type = proxy_settings::socks5;
|
||||
|
@ -991,6 +988,14 @@ void GUI::configureSession(bool deleteOptions) {
|
|||
proxySettings.type = proxy_settings::socks5_pw;
|
||||
break;
|
||||
}
|
||||
QString proxy_str;
|
||||
switch(options->getHTTPProxyType()) {
|
||||
case HTTP_PW:
|
||||
proxy_str = misc::toQString("http://")+options->getProxyUsername()+":"+options->getProxyPassword()+"@"+options->getProxyIp()+":"+misc::toQString(proxySettings.port);
|
||||
break;
|
||||
default:
|
||||
proxy_str = misc::toQString("http://")+options->getProxyIp()+":"+misc::toQString(proxySettings.port);
|
||||
}
|
||||
if(!proxy_str.isEmpty()) {
|
||||
// We need this for urllib in search engine plugins
|
||||
#ifdef Q_WS_WIN
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue