add http proxy support for yt

Conflicts:
	src/gui/proxyserver_setup.cpp
	src/neutrino.cpp
	src/system/httptool.cpp
	src/system/settings.h


Origin commit data
------------------
Branch: ni/coolstream
Commit: 58124802ce
Author: martii <m4rtii@gmx.de>
Date: 2013-06-16 (Sun, 16 Jun 2013)



------------------
This commit was generated by Migit
This commit is contained in:
martii
2013-06-16 20:58:38 +02:00
committed by [CST] Focus
parent 71b1bcb846
commit 96ed06eb2c
4 changed files with 47 additions and 0 deletions

View File

@@ -31,7 +31,9 @@
#include <string>
#include <OpenThreads/ScopedLock>
#include "settings.h"
#include "set_threadname.h"
#include <global.h>
#include "ytparser.h"
#include "ytcache.h"
@@ -127,6 +129,14 @@ bool cYTFeedParser::getUrl(std::string &url, std::string &answer, CURL *_curl_ha
curl_easy_setopt(_curl_handle, CURLOPT_TIMEOUT, URL_TIMEOUT);
curl_easy_setopt(_curl_handle, CURLOPT_NOSIGNAL, (long)1);
if(g_settings.softupdate_proxyserver != "") {
curl_easy_setopt(_curl_handle, CURLOPT_PROXY, g_settings.softupdate_proxyserver.c_str());
if(g_settings.softupdate_proxyusername != "") {
std::string tmp = g_settings.softupdate_proxyusername + ":" + g_settings.softupdate_proxypassword;
curl_easy_setopt(_curl_handle, CURLOPT_PROXYUSERPWD, tmp.c_str());
}
}
char cerror[CURL_ERROR_SIZE];
curl_easy_setopt(_curl_handle, CURLOPT_ERRORBUFFER, cerror);
@@ -159,6 +169,14 @@ bool cYTFeedParser::DownloadUrl(std::string &url, std::string &file, CURL *_curl
curl_easy_setopt(_curl_handle, CURLOPT_TIMEOUT, URL_TIMEOUT);
curl_easy_setopt(_curl_handle, CURLOPT_NOSIGNAL, (long)1);
if(g_settings.softupdate_proxyserver != "") {
curl_easy_setopt(_curl_handle, CURLOPT_PROXY, g_settings.softupdate_proxyserver.c_str());
if(g_settings.softupdate_proxyusername != "") {
std::string tmp = g_settings.softupdate_proxyusername + ":" + g_settings.softupdate_proxypassword;
curl_easy_setopt(_curl_handle, CURLOPT_PROXYUSERPWD, tmp.c_str());
}
}
char cerror[CURL_ERROR_SIZE];
curl_easy_setopt(_curl_handle, CURLOPT_ERRORBUFFER, cerror);