Browse Source

add timestamp in pac url

tags/3.2
clowwindy 10 years ago
parent
commit
68246e2653
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      shadowsocks-csharp/Controller/SystemProxy.cs

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

@@ -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");
}
}
}

Loading…
Cancel
Save