public static bool Start() { listener = new TcpListener(IPAddress.Any, 0); listener.Start(); listenerThread = new Thread(new ParameterizedThreadStart(Listen)); listenerThread.IsBackground = true; ShouldListen = true; listenerThread.Start(listener); if (SetAsSystemProxy) { SystemProxyHelper.EnableProxyHTTP("localhost", ListeningPort); FireFoxHelper.AddFirefox(); if (EnableSSL) { RootCertificateName = RootCertificateName == null ? "Titanium_Proxy_Test_Root" : RootCertificateName; bool certTrusted = CertManager.CreateTrustedRootCertificate(); //If certificate was trusted by the machine if (certTrusted) { SystemProxyHelper.EnableProxyHTTPS("localhost", ListeningPort); } } } return(true); }
public static bool Start() { listener = new TcpListener(IPAddress.Any, 0); listener.Start(); listenerThread = new Thread(new ParameterizedThreadStart(Listen)); listenerThread.IsBackground = true; ShouldListen = true; listenerThread.Start(listener); if (SetAsSystemProxy) { SystemProxyHelper.EnableProxyHTTP("localhost", ListeningPort); FireFoxHelper.AddFirefox(); if (EnableSSL) { RootCertificateName = RootCertificateName == null ? "DO_NOT_TRUST_FiddlerRoot" : RootCertificateName; bool certTrusted = CertManager.CreateTrustedRootCertificate(); if (!certTrusted) { // The user didn't want to install the self-signed certificate to the root store. } SystemProxyHelper.EnableProxyHTTPS("localhost", ListeningPort); } } return(true); }