Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

Mitmproxy Settings and Running

Walter Chen edited this page Oct 14, 2016 · 7 revisions

How to install mitmproxy on Ubuntu 14.04

  • sudo apt-get install python-pip python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg8-dev zlib1g-dev
  • sudo apt-get install mitmproxy

Install certificate

The easiest way to install your certificate is setup the proxy address in your browser to the mitmproxy. And surf the link http://mitm.it, click the platform you are using right now, then it will install the certificate for you automatically.

After installing the certificate in the system, you should set up the proxy address inside the browser. Also, you will need to set up certificate in Firefox > Advanced > Certificate

And you can also install the certificate yourself, the mitmproxy CA cert is located in ~/.mitmproxy after it has been generated at the first start of mitmproxy.

In Windows, you have to put the CA cert in trusted root certificates, then open a terminal to execute the command: certutil.exe -importpfx mitmproxy-ca-cert.p12 (this file is downloaded from mitm.it)

Then you can start the mitmproxy and try to connect to any https website

mitmdump

How to run

You don't need to start mitmproxy by yourself. You need to do:

1. set proxy of browsers to 127.0.0.1:8080
2. python runtest.py ... ... --profiler=mitmdump

Please note that you should start by running every test once so you can get all the flow files under flow directory with the same name as the test file name.

For Regression Tests:

python runtest.py regression suite.txt --max-run=1 --max-retry=1 --profiler=mitmdump

For Pilottest Tests:

python runtest.py pilottest suite.txt --max-run=1 --max-retry=1 --profiler=mitmdump

After the flow files are generated by the above mentioned commands, you may run the tests as usually.