|
|
@ -1008,6 +1008,7 @@ void GUI::configureSession(bool deleteOptions) { |
|
|
|
// * Proxy settings
|
|
|
|
// * Proxy settings
|
|
|
|
proxy_settings proxySettings; |
|
|
|
proxy_settings proxySettings; |
|
|
|
if(options->isProxyEnabled()) { |
|
|
|
if(options->isProxyEnabled()) { |
|
|
|
|
|
|
|
qDebug("Enabling P2P proxy"); |
|
|
|
proxySettings.hostname = options->getProxyIp().toStdString(); |
|
|
|
proxySettings.hostname = options->getProxyIp().toStdString(); |
|
|
|
proxySettings.port = options->getProxyPort(); |
|
|
|
proxySettings.port = options->getProxyPort(); |
|
|
|
if(options->isProxyAuthEnabled()) { |
|
|
|
if(options->isProxyAuthEnabled()) { |
|
|
@ -1029,8 +1030,12 @@ void GUI::configureSession(bool deleteOptions) { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
BTSession->setProxySettings(proxySettings, options->useProxyForTrackers(), options->useProxyForPeers(), options->useProxyForWebseeds(), options->useProxyForDHT()); |
|
|
|
BTSession->setProxySettings(proxySettings, options->useProxyForTrackers(), options->useProxyForPeers(), options->useProxyForWebseeds(), options->useProxyForDHT()); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
qDebug("Disabling P2P proxy"); |
|
|
|
|
|
|
|
BTSession->setProxySettings(proxySettings, false, false, false, false); |
|
|
|
} |
|
|
|
} |
|
|
|
if(options->isHTTPProxyEnabled()) { |
|
|
|
if(options->isHTTPProxyEnabled()) { |
|
|
|
|
|
|
|
qDebug("Enabling Search HTTP proxy"); |
|
|
|
// HTTP Proxy
|
|
|
|
// HTTP Proxy
|
|
|
|
QString proxy_str; |
|
|
|
QString proxy_str; |
|
|
|
switch(options->getHTTPProxyType()) { |
|
|
|
switch(options->getHTTPProxyType()) { |
|
|
@ -1049,13 +1054,13 @@ void GUI::configureSession(bool deleteOptions) { |
|
|
|
setenv("http_proxy", proxy_str.toUtf8().data(), 1); |
|
|
|
setenv("http_proxy", proxy_str.toUtf8().data(), 1); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
qDebug("Disabling search proxy"); |
|
|
|
#ifdef Q_WS_WIN |
|
|
|
#ifdef Q_WS_WIN |
|
|
|
putenv("http_proxy="); |
|
|
|
putenv("http_proxy="); |
|
|
|
#else |
|
|
|
#else |
|
|
|
unsetenv("http_proxy"); |
|
|
|
unsetenv("http_proxy"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// * Session settings
|
|
|
|
// * Session settings
|
|
|
|
session_settings sessionSettings; |
|
|
|
session_settings sessionSettings; |
|
|
|
if(options->shouldSpoofAzureus()) { |
|
|
|
if(options->shouldSpoofAzureus()) { |
|
|
|