Browse Source

全局模式切换到PAC模式时,清除ProxyServer

tags/2.5.3
li3shiyi 9 years ago
parent
commit
33e06067ac
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      shadowsocks-csharp/Controller/System/SystemProxy.cs

+ 3
- 1
shadowsocks-csharp/Controller/System/SystemProxy.cs View File

@@ -55,7 +55,9 @@ namespace Shadowsocks.Controller
else
pacUrl = "http://127.0.0.1:" + config.localPort.ToString() + "/pac?t=" + GetTimestamp(DateTime.Now);
registry.SetValue("ProxyEnable", 0);
//registry.SetValue("ProxyServer", ""); //Unnecessary
var readProxyServer = registry.GetValue("ProxyServer");
if (readProxyServer != null && readProxyServer.Equals("127.0.0.1:" + config.localPort.ToString()))
registry.SetValue("ProxyServer", "");
registry.SetValue("AutoConfigURL", pacUrl);
}
}


Loading…
Cancel
Save