Example #1
0
 public static void UpdateProxySettingOnDemand(Model.Data.ProxySettings proxySetting)
 {
     if (!proxySetting.IsEqualTo(GetProxySetting()))
     {
         WinInet.SetProxySettings(proxySetting);
     }
 }
Example #2
0
        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 ?? "",
            });
        }
Example #3
0
 public static Model.Data.ProxySettings GetProxySetting() =>
 WinInet.GetProxySettings();