mitmproxy 0.9 docs

Installation

Using Pip

The preferred way to install mitmproxy is to use pip. A single command will install the latest release of mitmproxy, along with all its dependencies:

sudo pip install mitmproxy

From Source

  • When installing from source, you will need to install the dependencies by hand.
  • Then run the following command from the base of the source distribution:
sudo python setup.py install

OSX

  • Make sure that XCode is installed from the App Store, and that the command-line tools have been downloaded (XCode/Preferences/Downloads).
  • Install pip using the following command:
sudo easy_install pip
  • Now use pip to set up the dependencies and do the install:
sudo pip install mitmproxy

This procedure may vary if, for instance, you've installed Python from an external source like homebrew. In that case, the easiest way to proceed is to first install easy_install, then continue as above.

There are a few bits of customization you might want to do to make mitmproxy comfortable to use. At the moment, mitmproxy's color scheme is optimized for a dark background terminal, so you probably want to change the default. You can use the OSX open program to create a simple and effective ~/.mailcap file to view HTTP bodies:

application/*; /usr/bin/open -Wn %s
audio/*; /usr/bin/open -Wn %s
image/*; /usr/bin/open -Wn %s
video/*; /usr/bin/open -Wn %s

© mitmproxy project, 2012