public static void UpdateProxySettingOnDemand(Model.Data.ProxySettings proxySetting) { if (!proxySetting.IsEqualTo(GetProxySetting())) { WinInet.SetProxySettings(proxySetting); } }
public static void SetPacProxy(string pacUrl) { var url = pacUrl + "?&t=" + RandomHex(8); WinInet.SetProxySettings(new Model.Data.ProxySettings { proxyMode = (int)WinInet.ProxyModes.PAC, pacUrl = url ?? "", }); }
public static Model.Data.ProxySettings GetProxySetting() => WinInet.GetProxySettings();