There are only a few steps here, but they are important ones:
1) $ sudo easy_install pip
2) $ sudo pip install mitmproxy
3) $ mitmproxy –version
You are using an outdated version of pyOpenSSL: mitmproxy requires pyOpenSSL 0.14 or greater.
Your pyOpenSSL 0.13.1 installation is located at /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL
4) $ sudo easy_install –upgrade PyOpenSSL
5) $mitmproxy –version
mitmproxy 0.11.3
The instructions as given yield:
c/_cffi_backend.c:13:10: fatal error: ‘ffi.h’ file not found
#include
^
1 error generated.
error: command ‘cc’ failed with exit status 1
… so I ended up using homebrew rather than pip as the agent:
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
brew install mitmproxy