Proxy oNewProxy = new Proxy(false);
// Want a secure listener?
if (!oNewProxy.ActAsHTTPSEndpointForHostname(sHostnameForHTTPS)
{
MessageBox.Show(String.Format("Failed to create secure listener on port #{0} for {1}", i, sHostnameForHTTPS), "Failure");
}
else
{
oNewProxy.Start(i, true);
MessageBox.Show(String.Format("Started new Secure Listener on port #{0} with certificate SubjectCN={1}", i, sHostnameForHTTPS), "Success");
FiddlerApplication.Log.LogFormat("Started new Secure Listener on port #{0} with certificate SubjectCN={1}", i, sHostnameForHTTPS);
}
}
else
{
oNewProxy.Start(i, true);
MessageBox.Show(String.Format("Started new Listener on port #{0}", i), "Success");
FiddlerApplication.Log.LogFormat("Started new Listener on port #{0}", i);
}
-Eric
Proxy oNewProxy = new Proxy(false); --> The list of attributes does not apply to the current context
var oNewProxy: Proxy = new Proxy(false); --> No such constructor
RegardsWhat if it is not possible to install the certificate on the client (because one has no access to the client)?Is there any other alternative?Or this truly is a dead end?
(a) Specify the PFX certificate (exported with private key) that Fiddler should use for identifying itself to requesting clients and also for decrypting incoming HTTPS traffic (Available from Fiddler v 2.2.4.2):
CertMaker.StoreCert("www.yourhostname.com", "C:\\whatever\yourhostname.pfx", "yourpfxpassword");
(b) Forward requests destined for usual port 80 / 443 (HTTP / HTTPS) to 8888, the port number just assigned to the website.if (oSession.host.toLowerCase() == "www.yourhostname.com") oSession.host = "www.yourhostname.com:8888";
Gotcha: Do not specify port number 80 or 443 for oSession.host.toLowerCase (I made this newbie mistake. The official wiki was silent on this.)
if (oSession.host.toLowerCase() == "www.yourhostname.com") oSession.host = "www.yourhostname.com:8888";
CertMaker.StoreCert("www.yourhostname.com", "C:\\whatever\yourhostname.pfx", "yourpfxpassword");
// Assume that the secure server is on port 444.if (oSession.HostnameIs("www.yourhostname.com")) oSession.host = "www.yourhostname.com:444";