mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 05:48:47 +03:00
- Ok, HTTP proxy code is working now
This commit is contained in:
parent
fbe292d06e
commit
e3ae03c8a8
1 changed files with 3 additions and 2 deletions
|
@ -1040,10 +1040,10 @@ void GUI::configureSession(bool deleteOptions) {
|
||||||
QString proxy_str;
|
QString proxy_str;
|
||||||
switch(options->getHTTPProxyType()) {
|
switch(options->getHTTPProxyType()) {
|
||||||
case HTTP_PW:
|
case HTTP_PW:
|
||||||
proxy_str = misc::toQString("http://")+options->getProxyUsername()+":"+options->getProxyPassword()+"@"+options->getProxyIp()+":"+misc::toQString(proxySettings.port);
|
proxy_str = misc::toQString("http://")+options->getHTTPProxyUsername()+":"+options->getHTTPProxyPassword()+"@"+options->getHTTPProxyIp()+":"+misc::toQString(options->getHTTPProxyPort());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
proxy_str = misc::toQString("http://")+options->getProxyIp()+":"+misc::toQString(proxySettings.port);
|
proxy_str = misc::toQString("http://")+options->getHTTPProxyIp()+":"+misc::toQString(options->getHTTPProxyPort());
|
||||||
}
|
}
|
||||||
// We need this for urllib in search engine plugins
|
// We need this for urllib in search engine plugins
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_WS_WIN
|
||||||
|
@ -1051,6 +1051,7 @@ void GUI::configureSession(bool deleteOptions) {
|
||||||
snprintf(proxystr, 512, "http_proxy=%s", proxy_str.toUtf8().data());
|
snprintf(proxystr, 512, "http_proxy=%s", proxy_str.toUtf8().data());
|
||||||
putenv(proxystr);
|
putenv(proxystr);
|
||||||
#else
|
#else
|
||||||
|
qDebug("HTTP: proxy string: %s", proxy_str.toUtf8().data());
|
||||||
setenv("http_proxy", proxy_str.toUtf8().data(), 1);
|
setenv("http_proxy", proxy_str.toUtf8().data(), 1);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue