示例#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();