public void Enable() { PrivoxyRunner privoxyRunner = new PrivoxyRunner(); privoxyRunner.Start(); privoxyRunner.AutoStart(); HostsChecker hostsChecker = new HostsChecker(); hostsChecker.Check(); SystemProxy.Update(true); }
private static void CopyProxySettingFromLan() { RegistryKey registry = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Connections", true); var defaultValue = registry.GetValue("DefaultConnectionSettings"); try { var connections = registry.GetValueNames(); foreach (String each in connections) { if (!(each.Equals("DefaultConnectionSettings") || each.Equals("LAN Connection") || each.Equals("SavedLegacySettings"))) { //set all the connections's proxy as the lan registry.SetValue(each, defaultValue); } } SystemProxy.NotifyIE(); } catch { } }