mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user