added: url option to set proxy for http streams #2003

Closed
wants to merge 3 commits into
from
@@ -716,6 +716,23 @@ void CCurlFile::ParseAndCorrectUrl(CURL &url2)
SetCookie(value);
else if (name.Equals("Encoding"))
SetContentEncoding(value);
+ else if (name.Equals("Proxy") && !g_guiSettings.GetBool("network.usehttpproxy"))
+ {
+ if (name.Equals("ProxyUserPass"))
+ {
+ SetProxyUserPass(value);
+ }
+ if (value.Left(7).Equals("http://"))
+ {
+ m_proxy = value;
+ }
+ else
+ {
+ m_proxy = "http://" + value;
+ }
+ SetProxy(m_proxy);
+ CLog::Log(LOGDEBUG, "Using url option proxy %s", m_proxy.c_str());
+ }
else if (name.Equals("noshout") && value.Equals("true"))
m_skipshout = true;
else