//instead = we are going to perform a man in the middle "attack"
//the user's browser should warn them of the certification errors, so we need to install our root certficate in users machine as Certificate Authority.
Console.WriteLine("To make Http(s) work install the test root certificate included in this project to both Personal and Trusted Root Certificate Authorities of client machine");
Console.WriteLine("Hit any key to exit");
Console.Read();
controller.Stop();
}
publicvoidStartProxy()
{
_server=newProxyServer();
_server.BeforeRequest+=OnRequest;
_server.BeforeResponse+=OnResponse;
_server.Start();
Console.WriteLine(String.Format("Proxy listening on local machine port: {0} ",_server.ListeningPort));