diff options
Diffstat (limited to 'src/plugins/Transports/http/httpstreamreader.cpp')
| -rw-r--r-- | src/plugins/Transports/http/httpstreamreader.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/Transports/http/httpstreamreader.cpp b/src/plugins/Transports/http/httpstreamreader.cpp index 5cba24d0c..0cefbe775 100644 --- a/src/plugins/Transports/http/httpstreamreader.cpp +++ b/src/plugins/Transports/http/httpstreamreader.cpp @@ -325,12 +325,19 @@ void HttpStreamReader::run() m_handle = curl_easy_init(); //proxy if (QmmpSettings::instance()->isProxyEnabled()) + { curl_easy_setopt(m_handle, CURLOPT_PROXY, strdup((QmmpSettings::instance()->proxy().host() + ":" + QString("%1").arg(QmmpSettings::instance()->proxy().port())). toLatin1 ().constData ())); + + if(QmmpSettings::instance()->proxyType() == QmmpSettings::SOCKS5_PROXY) + curl_easy_setopt(m_handle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); + } else + { curl_easy_setopt(m_handle, CURLOPT_NOPROXY, "*"); + } if (QmmpSettings::instance()->useProxyAuth()) curl_easy_setopt(m_handle, CURLOPT_PROXYUSERPWD, |
