public static void Exit() { HttpServer.Listener.Close(); ProxyHandler.GetInstance().UnsetProxy(); SysProxyProcess.WaitForExit(); try { PolipoProcess.Kill(); V2rayProcess.Kill(); } catch (Exception) { } ConfigHandler.SaveFile(); Application.Exit(); }
public static void RefreshProxyMode() { _config = ConfigHandler.GetConfig(); switch (_config.IsProxyOn) { case true: switch (_config.ProxyMode) { case ProxyMode.Pac: PacProxyHandler.GetInstance().SetProxy(); break; case ProxyMode.Sys: SysProxyHandler.GetInstance().SetProxy(); break; } break; case false: ProxyHandler.GetInstance().UnsetProxy(); break; } }