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