add http proxy support for yt

Conflicts:
	src/gui/proxyserver_setup.cpp
	src/neutrino.cpp
	src/system/httptool.cpp
	src/system/settings.h
This commit is contained in:
martii
2013-06-16 20:58:38 +02:00
committed by [CST] Focus
parent 2b236ea1c8
commit 58124802ce
4 changed files with 47 additions and 0 deletions

View File

@@ -97,5 +97,16 @@ int CProxySetup::showProxySetup()
int res = mn->exec(NULL, "");
delete mn;
if (g_settings.softupdate_proxyserver == "")
unsetenv("http_proxy");
else {
std::string proxy = "http://";
if (g_settings.softupdate_proxyusername != "")
proxy += g_settings.softupdate_proxyusername + ":" + g_settings.softupdate_proxypassword + "@";
proxy += g_settings.softupdate_proxyserver;
setenv("http_proxy", proxy.c_str(), 1);
}
return res;
}