public static Proxy CreateProxyEndpoint(int iPort, bool bAllowRemote, X509Certificate2 certHTTPS) { Proxy proxy = new Proxy(false); if (certHTTPS != null) { proxy.AssignEndpointCertificate(certHTTPS); } if (proxy.Start(iPort, bAllowRemote)) { return(proxy); } proxy.Dispose(); return(null); }
public static Proxy CreateProxyEndpoint(int iPort, bool bAllowRemote, string sHTTPSHostname) { Proxy proxy = new Proxy(false); if (!string.IsNullOrEmpty(sHTTPSHostname)) { proxy.ActAsHTTPSEndpointForHostname(sHTTPSHostname); } if (proxy.Start(iPort, bAllowRemote)) { return(proxy); } proxy.Dispose(); return(null); }
public static void Startup(int iListenPort, FiddlerCoreStartupFlags oFlags) { if (oProxy != null) { throw new InvalidOperationException("Calling startup twice without calling shutdown is not permitted."); } if ((iListenPort < 0) || (iListenPort > 0xffff)) { throw new ArgumentOutOfRangeException("bListenPort", "Port must be between 0 and 65535."); } CONFIG.ListenPort = iListenPort; CONFIG.bAllowRemoteConnections = FiddlerCoreStartupFlags.None < (oFlags & FiddlerCoreStartupFlags.AllowRemoteClients); CONFIG.bMITM_HTTPS = FiddlerCoreStartupFlags.None < (oFlags & FiddlerCoreStartupFlags.DecryptSSL); CONFIG.bCaptureCONNECT = true; CONFIG.bCaptureFTP = FiddlerCoreStartupFlags.None < (oFlags & FiddlerCoreStartupFlags.CaptureFTP); CONFIG.bForwardToGateway = FiddlerCoreStartupFlags.None < (oFlags & FiddlerCoreStartupFlags.ChainToUpstreamGateway); CONFIG.bHookAllConnections = FiddlerCoreStartupFlags.None < (oFlags & FiddlerCoreStartupFlags.MonitorAllConnections); if (FiddlerCoreStartupFlags.None < (oFlags & FiddlerCoreStartupFlags.CaptureLocalhostTraffic)) { CONFIG.sHostsThatBypassFiddler = CONFIG.sHostsThatBypassFiddler; } oProxy = new Proxy(true); if (oProxy.Start(CONFIG.ListenPort, CONFIG.bAllowRemoteConnections)) { if (iListenPort == 0) { CONFIG.ListenPort = oProxy.ListenPort; } if (FiddlerCoreStartupFlags.None < (oFlags & FiddlerCoreStartupFlags.RegisterAsSystemProxy)) { oProxy.Attach(true); } else if (FiddlerCoreStartupFlags.None < (oFlags & FiddlerCoreStartupFlags.ChainToUpstreamGateway)) { oProxy.CollectConnectoidAndGatewayInfo(); } } }
public static Proxy CreateProxyEndpoint(int iPort, bool bAllowRemote, string sHTTPSHostname) { Proxy proxy = new Proxy(false); if (!string.IsNullOrEmpty(sHTTPSHostname)) { proxy.ActAsHTTPSEndpointForHostname(sHTTPSHostname); } if (proxy.Start(iPort, bAllowRemote)) { return proxy; } proxy.Dispose(); return null; }
public static Proxy CreateProxyEndpoint(int iPort, bool bAllowRemote, X509Certificate2 certHTTPS) { Proxy proxy = new Proxy(false); if (certHTTPS != null) { proxy.AssignEndpointCertificate(certHTTPS); } if (proxy.Start(iPort, bAllowRemote)) { return proxy; } proxy.Dispose(); return null; }