1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-10 23:07:59 +00:00

- Added debug for proxy code

This commit is contained in:
Christophe Dumez 2009-01-03 22:33:05 +00:00
parent d40c646561
commit f36052351c

View File

@ -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()) {