Install mitmproxy on Mac OS X

A note on how to install mitmproxy (man-in-the-middle proxy) on Mac OS X.

environment

The target environment is as follows. This time, Python uses the system standard one. In addition, Xcode Command Line Tools are required separately.

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.10.1
BuildVersion:	14B25
$ uname -a
14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
$ python -V
Python 2.7.6

install pip

Install pip, Python's package management system. This time, install it under the user's home directory.

$ wget https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py --user
...
Installing collected packages: pip

Install mitmproxy

Then install mitmproxy. I installed pip under my home directory, so I need to put it in my PATH.

$ PATH=$PATH:~/Library/Python/2.7/bin
$ pip --version
pip 6.0.6 from /Users/USERNAME/Library/Python/2.7/lib/python/site-packages (python 2.7)
$ pip install --user mitmproxy

Check the version of mitmproxy

You can check the version with the --version option of the mitmproxy command.

$ mitmproxy --version
mitmproxy 0.11.3

If the error message "PyOpenSSL version is old" is displayed as shown below, you need to update PyOpenSSL.

$ 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
$ sudo easy_install --upgrade PyOpenSSL
$ mitmproxy --version
mitmproxy 0.11.3

reference

Recommended Posts

Install mitmproxy on Mac OS X
Install Sphinx on Mac OS X
Install pgmagick on Mac OS X 10.9
Memo on Mac OS X
Very easy to install SciPy on Mac OS X
Install Scipy on Mac OS Sierra
Install PyQt5 with homebrew on Mac OS X Marvericks (10.9.2)
How to install Theano on Mac OS X with homebrew
Install matplotlib on OS X El Capitan
Installed aws-cli On Mac OS X Lion
Run NASA CEA on Mac OS X
Install Tensorflow on Mac
Install pyenv on mac
Install Python on Mac
Install Python 3 on Mac
Install Python 3.4 on Mac
Install Caffe on Mac
Install mecab on mac
Install mecab-python on Mac
Install lp_solve on Mac OS X and call it with python.
How to install Theano on Mac OS X 10.10 (using pyenv, anaconda)
Run Zookeeper x python (kazoo) on Mac OS X
Shpinx (Python documentation builder) on Mac OS X
Install pygame on python3.4 on mac
Install tomcat 9 on Cent OS 8
Install module on Anaconda (Mac)
Install OpenPose on mac (Catalina)
Install numba on your Mac
Install pandas 0.14 on python3.4 [on Mac]
Install Django on your Mac
Install pillow on Mac OSX 10.9
[Mac] Tips: Install pyquery on Mac [pyquery]
Building an environment for "Tello_Video" on Mac OS X
How to install caffe on OS X with macports
Try using E-Cell 4 on Windows 7 or Mac OS X
Build a Python development environment on Mac OS X
mac OS X 10.15.x pyenv Python If you can't install
Using multiple versions of Python on Mac OS X (2) Usage
Install anaconda on Mac → Add Library
How to install mysql-connector-python on mac
Using NAOqi 2.4.2 Python SDK on Mac OS X El Capitan
Install Adopt OpenJDK 11 on Cent OS 8
Install Python 3.8 on Ubuntu 20.04 (OS standard)
Steps to install matplotlib on Mac
Installation of scikit-learn (Mac OS X)
Install Python 3.7 Anaconda on MAC, but Python 2
Install python3 on Mac (El Capitan)
Install VirtualBox on CentOS 7 on VirtualBox (mac + vagrant)
Install Python 3.9 on Ubuntu 20.04 (OS standard?)
Install Python 2.7 on Ubuntu 20.04 (OS standard?)
Steps to install python3 on mac
Get started with the Python framework Django on Mac OS X
Using multiple versions of Python on Mac OS X (1) Multiple Ver installation
Continuation ・ Notes on preparing the Python development environment on Mac OS X
Quickly install OpenCV 2.4 (+ python) on OS X and try the sample
Mac OS X Mavericks 10.9.5 Development environment construction
Install opencv on Mac using Anaconda Navigator
How to install drobertadams / toggl-cli on Mac
Install docker-compose on 64-bit Raspberry Pi OS
GeoDjango + SQLite environment construction on OS X
Mac OS X Yosemite 10.10 Development environment construction