Here's my application's code:
public partial class frmMain : Form { private KeyValuePair<string, string>[] EncodeKeys = { new KeyValuePair<string, string>("MfZyu1q9", "EmcshnQoDr20TZz1") }; public frmMain() { InitializeComponent(); } public static bool InstallCertificate() { if (!CertMaker.rootCertExists()) { if (!CertMaker.createRootCert()) return false; if (!CertMaker.trustRootCert()) return false; } return true; } private void frmMain_Load(object sender, EventArgs e) { if (!InstallCertificate()) MessageBox.Show("Failed to install certificate."); try { FiddlerApplication.BeforeRequest += FiddlerApplication_BeforeRequest; FiddlerApplication.BeforeResponse += FiddlerApplication_BeforeResponse; //FiddlerApplication.AfterSessionComplete += FiddlerApplication_AfterSessionComplete; FiddlerApplication.Startup(8888, true, true, true); } catch (Exception ex) { MessageBox.Show(ex.Message); } } void FiddlerApplication_BeforeRequest(Session oSession) { if (oSession.RequestMethod == "CONNECT") return; oSession.bBufferResponse = true; } void FiddlerApplication_BeforeResponse(Session oSession) { if (oSession.RequestMethod == "CONNECT") return; try { //if (oSession.uriContains("action")) //{ oSession.utilDecodeResponse(); Debug.Print(oSession.GetResponseBodyAsString()); //} } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
Now this all works on my home computer when I connect remotely, it captures traffic just fine. However, on my work computer which I am using right now it does not work.
This isn't a firewall issue, because when I open the Fiddler application, it captures the remote traffic just as it's supposed to within my program.
I set my iPhone to connect to the proxy, and whenever I go to load a page, it just doesn't load and gives me "Safari could not open the page because the server stopped responding."