Exemple #1
0
 internal void CollectConnectoidAndGatewayInfo()
 {
     this.oAllConnectoids = new WinINETConnectoids();
     this.piPrior         = this.oAllConnectoids.GetDefaultConnectionGatewayInfo();
     if (KPCONFIG.bForwardToGateway && ((this.piPrior.sPACScriptLocation != null) || this.piPrior.bAutoDetect))
     {
         this.oAutoProxy = new WinHTTPAutoProxy(this.piPrior.bAutoDetect, this.piPrior.sPACScriptLocation);
     }
     else if (this.oAutoProxy != null)
     {
         this.oAutoProxy.Dispose();
         this.oAutoProxy = null;
     }
     if (KPCONFIG.bForwardToGateway && this.piPrior.bUseManualProxies)
     {
         this._DetermineGatewayIPEndPoints();
         if (string.IsNullOrEmpty(this.piPrior.sHostsThatBypass))
         {
             this.oBypassList = null;
         }
         else
         {
             this.oBypassList = new ProxyBypassList(this.piPrior.sHostsThatBypass);
             if (!this.oBypassList.HasEntries)
             {
                 this.oBypassList = null;
             }
         }
     }
     else
     {
         this._ipepFtpGateway = this._ipepHttpGateway = (IPEndPoint)(this._ipepHttpsGateway = null);
         this.oBypassList     = null;
     }
 }
Exemple #2
0
 public void Dispose()
 {
     if (this.watcherPrefNotify.HasValue)
     {
         KProxyApplication.Prefs.RemoveWatcher(this.watcherPrefNotify.Value);
     }
     if (this.oAutoProxy != null)
     {
         this.oAutoProxy.Dispose();
         this.oAutoProxy = null;
     }
     this.Stop();
 }