mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user