add timestamp in pac url
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user