aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/General/lyrics/lyricswindow.cpp2
-rw-r--r--src/plugins/General/scrobbler/scrobbler.cpp4
-rw-r--r--src/plugins/General/streambrowser/streamwindow.cpp2
-rw-r--r--src/plugins/Input/cdaudio/decoder_cdaudio.cpp2
-rw-r--r--src/plugins/Transports/http/httpstreamreader.cpp7
5 files changed, 16 insertions, 1 deletions
diff --git a/src/plugins/General/lyrics/lyricswindow.cpp b/src/plugins/General/lyrics/lyricswindow.cpp
index 17fe95109..0ef6c83d6 100644
--- a/src/plugins/General/lyrics/lyricswindow.cpp
+++ b/src/plugins/General/lyrics/lyricswindow.cpp
@@ -47,6 +47,8 @@ LyricsWindow::LyricsWindow(const QString &artist, const QString &title, QWidget
if (gs->isProxyEnabled())
{
QNetworkProxy proxy(QNetworkProxy::HttpProxy, gs->proxy().host(), gs->proxy().port());
+ if(gs->proxyType() == QmmpSettings::SOCKS5_PROXY)
+ proxy.setType(QNetworkProxy::Socks5Proxy);
if(gs->useProxyAuth())
{
proxy.setUser(gs->proxy().userName());
diff --git a/src/plugins/General/scrobbler/scrobbler.cpp b/src/plugins/General/scrobbler/scrobbler.cpp
index 07f33e72d..9c8a9a0ea 100644
--- a/src/plugins/General/scrobbler/scrobbler.cpp
+++ b/src/plugins/General/scrobbler/scrobbler.cpp
@@ -268,6 +268,8 @@ void Scrobbler::setupProxy()
if (gs->isProxyEnabled())
{
QNetworkProxy proxy(QNetworkProxy::HttpProxy, gs->proxy().host(), gs->proxy().port());
+ if(gs->proxyType() == QmmpSettings::SOCKS5_PROXY)
+ proxy.setType(QNetworkProxy::Socks5Proxy);
if(gs->useProxyAuth())
{
proxy.setUser(gs->proxy().userName());
@@ -399,6 +401,8 @@ ScrobblerAuth::ScrobblerAuth(const QString &scrobblerUrl, const QString &authUrl
if (gs->isProxyEnabled())
{
QNetworkProxy proxy(QNetworkProxy::HttpProxy, gs->proxy().host(), gs->proxy().port());
+ if(gs->proxyType() == QmmpSettings::SOCKS5_PROXY)
+ proxy.setType(QNetworkProxy::Socks5Proxy);
if(gs->useProxyAuth())
{
proxy.setUser(gs->proxy().userName());
diff --git a/src/plugins/General/streambrowser/streamwindow.cpp b/src/plugins/General/streambrowser/streamwindow.cpp
index 504914025..dc276e872 100644
--- a/src/plugins/General/streambrowser/streamwindow.cpp
+++ b/src/plugins/General/streambrowser/streamwindow.cpp
@@ -96,6 +96,8 @@ StreamWindow::StreamWindow(QWidget *parent)
if (gs->isProxyEnabled())
{
QNetworkProxy proxy(QNetworkProxy::HttpProxy, gs->proxy().host(), gs->proxy().port());
+ if(gs->proxyType() == QmmpSettings::SOCKS5_PROXY)
+ proxy.setType(QNetworkProxy::Socks5Proxy);
if(gs->useProxyAuth())
{
proxy.setUser(gs->proxy().userName());
diff --git a/src/plugins/Input/cdaudio/decoder_cdaudio.cpp b/src/plugins/Input/cdaudio/decoder_cdaudio.cpp
index 11e8119ab..afc6b2995 100644
--- a/src/plugins/Input/cdaudio/decoder_cdaudio.cpp
+++ b/src/plugins/Input/cdaudio/decoder_cdaudio.cpp
@@ -252,7 +252,7 @@ QList<CDATrack> DecoderCDAudio::generateTrackList(const QString &device, TrackIn
{
cddb_http_enable (cddb_conn);
cddb_set_http_path_query (cddb_conn, settings.value("cddb_path").toByteArray().constData());
- if (QmmpSettings::instance()->isProxyEnabled())
+ if (QmmpSettings::instance()->isProxyEnabled() && QmmpSettings::instance()->proxyType() == QmmpSettings::HTTP_PROXY)
{
QUrl proxy = QmmpSettings::instance()->proxy();
cddb_http_proxy_enable (cddb_conn);
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,