コード例 #1
0
        internal WinINETProxyInfo GetDefaultConnectionGatewayInfo()
        {
            string text = CONFIG.sHookConnectionNamed;

            if (string.IsNullOrEmpty(text))
            {
                text = "DefaultLAN";
            }
            if (!this._oConnectoids.ContainsKey(text))
            {
                text = "DefaultLAN";
                if (!this._oConnectoids.ContainsKey(text))
                {
                    FiddlerApplication.Log.LogString("!WARNING: The DefaultLAN Gateway information could not be obtained.");
                    return(WinINETProxyInfo.CreateFromStrings(string.Empty, string.Empty));
                }
            }
            return(this._oConnectoids[text].oOriginalProxyInfo);
        }
コード例 #2
0
        internal void RefreshUpstreamGatewayInformation()
        {
            this._ipepFtpGateway = (this._ipepHttpGateway = (this._ipepHttpsGateway = null));
            this.piSystemGateway = null;
            this.oBypassList     = null;
            if (this.oAutoProxy != null)
            {
                this.oAutoProxy.Dispose();
                this.oAutoProxy = null;
            }
            switch (CONFIG.UpstreamGateway)
            {
            case GatewayType.None:
                FiddlerApplication.Log.LogString("Setting upstream gateway to none");
                return;

            case GatewayType.Manual:
            {
                WinINETProxyInfo oPI = WinINETProxyInfo.CreateFromStrings(FiddlerApplication.Prefs.GetStringPref("fiddler.network.gateway.proxies", string.Empty), FiddlerApplication.Prefs.GetStringPref("fiddler.network.gateway.exceptions", string.Empty));
                this.AssignGateway(oPI);
                return;
            }

            case GatewayType.System:
                this.AssignGateway(this.oAllConnectoids.GetDefaultConnectionGatewayInfo());
                return;

            case GatewayType.WPAD:
                FiddlerApplication.Log.LogString("Setting upstream gateway to WPAD");
                this.oAutoProxy = new WinHTTPAutoProxy(true, null);
                return;

            default:
                return;
            }
        }