diff --git a/src/libtomahawk/network/servent.cpp b/src/libtomahawk/network/servent.cpp index 285811780..d483610a9 100644 --- a/src/libtomahawk/network/servent.cpp +++ b/src/libtomahawk/network/servent.cpp @@ -18,18 +18,18 @@ #include "servent.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef ENABLE_HEADLESS - #include - #include + #include + #include #endif #include "result.h" @@ -70,7 +70,9 @@ Servent::Servent( QObject* parent ) new ACLSystem( this ); - setProxy( QNetworkProxy::NoProxy ); + // Don't use system default proxy, so if SOCKS 5 specified, use that, otherwise set no proxy + if ( TomahawkSettings::instance()->proxyHost().isEmpty() ) + setProxy( QNetworkProxy::NoProxy ); { boost::function(result_ptr)> fac = diff --git a/src/libtomahawk/network/servent.h b/src/libtomahawk/network/servent.h index 1dfa6730e..f344c348a 100644 --- a/src/libtomahawk/network/servent.h +++ b/src/libtomahawk/network/servent.h @@ -22,15 +22,15 @@ // time before new connection terminates if no auth received #define AUTH_TIMEOUT 180000 -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/src/libtomahawk/utils/tomahawkutils.cpp b/src/libtomahawk/utils/tomahawkutils.cpp index 2040f420f..f77e9e312 100644 --- a/src/libtomahawk/utils/tomahawkutils.cpp +++ b/src/libtomahawk/utils/tomahawkutils.cpp @@ -487,8 +487,10 @@ NetworkProxyFactory::NetworkProxyFactory( const NetworkProxyFactory& other ) QList< QNetworkProxy > NetworkProxyFactory::proxyForQuery( const QNetworkProxyQuery& query ) { + tDebug() << Q_FUNC_INFO; TomahawkUtils::NetworkProxyFactory* proxyFactory = TomahawkUtils::proxyFactory(); QList< QNetworkProxy > proxies = proxyFactory->queryProxy( query ); + tDebug() << Q_FUNC_INFO << " proxies size = " << proxies.size(); return proxies; } @@ -496,6 +498,7 @@ NetworkProxyFactory::proxyForQuery( const QNetworkProxyQuery& query ) QList< QNetworkProxy > NetworkProxyFactory::queryProxy( const QNetworkProxyQuery& query ) { + tDebug() << Q_FUNC_INFO << "query.peerHostName() = " << query.peerHostName() << ", m_noProxyHosts = " << m_noProxyHosts; QList< QNetworkProxy > proxies; QString hostname = query.peerHostName(); if ( hostname.isEmpty() || m_noProxyHosts.contains( hostname ) ) @@ -503,6 +506,7 @@ NetworkProxyFactory::queryProxy( const QNetworkProxyQuery& query ) else proxies << m_proxy << QNetworkProxy( QNetworkProxy::NoProxy ) << QNetworkProxy( QNetworkProxy::DefaultProxy ); + tDebug() << Q_FUNC_INFO << " proxies size = " << proxies.size(); return proxies; } @@ -608,6 +612,7 @@ setProxyFactory( NetworkProxyFactory* factory, bool noMutexLocker ) *currFactory = *factory; } } + QNetworkProxyFactory::setApplicationProxyFactory( factory ); } *s_threadProxyFactoryHash[ QThread::currentThread() ] = *factory;