diff --git a/shadowsocks-csharp/Controller/SystemProxy.cs b/shadowsocks-csharp/Controller/SystemProxy.cs index a024d8db..c41bbf11 100755 --- a/shadowsocks-csharp/Controller/SystemProxy.cs +++ b/shadowsocks-csharp/Controller/SystemProxy.cs @@ -28,7 +28,7 @@ namespace shadowsocks_csharp RegistryKey registry = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", true); registry.SetValue("ProxyEnable", 0); registry.SetValue("ProxyServer", ""); - registry.SetValue("AutoConfigURL", "http://127.0.0.1:8090/pac"); + registry.SetValue("AutoConfigURL", "http://127.0.0.1:8090/pac?t=" + GetTimestamp(DateTime.Now)); SystemProxy.NotifyIE(); } @@ -40,5 +40,10 @@ namespace shadowsocks_csharp registry.SetValue("AutoConfigURL", ""); SystemProxy.NotifyIE(); } + + private static String GetTimestamp(DateTime value) + { + return value.ToString("yyyyMMddHHmmssffff"); + } } }