Update SysProxyHandle.cs

pull/188/head 2.45
2dust 2019-10-17 11:00:36 +08:00
parent b94d10d808
commit a922d3c46d
1 changed files with 16 additions and 14 deletions

View File

@ -49,14 +49,14 @@ namespace v2rayN.HttpProxyHandler
public static void SetIEProxy(bool enable, bool global, string proxyServer, string pacURL) public static void SetIEProxy(bool enable, bool global, string proxyServer, string pacURL)
{ {
Read(); //Read();
if (!_userSettings.UserSettingsRecorded) //if (!_userSettings.UserSettingsRecorded)
{ //{
// record user settings // // record user settings
ExecSysproxy("query"); // ExecSysproxy("query");
ParseQueryStr(_queryStr); // ParseQueryStr(_queryStr);
} //}
string arguments; string arguments;
if (enable) if (enable)
@ -71,17 +71,19 @@ namespace v2rayN.HttpProxyHandler
else else
{ {
// restore user settings // restore user settings
var flags = _userSettings.Flags; //var flags = _userSettings.Flags;
var proxy_server = _userSettings.ProxyServer ?? "-"; //var proxy_server = _userSettings.ProxyServer ?? "-";
var bypass_list = _userSettings.BypassList ?? "-"; //var bypass_list = _userSettings.BypassList ?? "-";
var pac_url = _userSettings.PacUrl ?? "-"; //var pac_url = _userSettings.PacUrl ?? "-";
arguments = string.Format("set {0} {1} {2} {3}", flags, proxy_server, bypass_list, pac_url); ////arguments = string.Format("set {0} {1} {2} {3}", flags, proxy_server, bypass_list, pac_url);
//set null settings
arguments = string.Format("set {0} {1} {2} {3}", 1, "-", "<local>", @"http://127.0.0.1");
// have to get new settings // have to get new settings
_userSettings.UserSettingsRecorded = false; //_userSettings.UserSettingsRecorded = false;
} }
Save(); //Save();
ExecSysproxy(arguments); ExecSysproxy(arguments);
} }