aboutsummaryrefslogtreecommitdiffstats
path: root/docs/install.rst
blob: 70b527315212d6b9579df5a507133f5c5cb1ffdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
.. _install:

Installation
============

Please follow the steps for your operating system.

Once installation is complete, you can run :ref:`mitmproxy`, :ref:`mitmdump` or :ref:`mitmweb` from a terminal.


.. _install-macos:

Installation on macOS
---------------------

You can use Homebrew to install everything:

.. code:: bash

    brew install mitmproxy

Or you can download the pre-built binary packages from `mitmproxy.org`_.


.. _install-windows:

Installation on Windows
-----------------------

The recommended way to install mitmproxy on Windows is to use the installer provided at `mitmproxy.org`_. After installation, you'll find shortcuts for :ref:`mitmweb` (the web-based interface) and :ref:`mitmdump` in the start menu. Both executables are  added to your PATH and can be invoked from the command line.

.. note::
    mitmproxy's console interface is not supported on Windows, but you can use mitmweb (the web-based interface) and mitmdump.

.. _install-linux:

Installation on Linux
---------------------

The recommended way to run mitmproxy on Linux is to use the pre-built binaries provided at `mitmproxy.org`_.

Our pre-built binaries provide you with the latest version of mitmproxy, a self-contained Python 3.5 environment and a recent version of OpenSSL that supports HTTP/2. Of course, you can also install mitmproxy from source if you prefer that (see :ref:`install-advanced`).

.. _install-advanced:

Advanced Installation
---------------------

.. _install-docker:

Docker Images
^^^^^^^^^^^^^

You can also use the official mitmproxy images from `DockerHub`_.
That being said, our portable binaries are just as easy to install and even easier to use. 😊



.. _install-arch:

Installation on Arch Linux
^^^^^^^^^^^^^^^^^^^^^^^^^^

mitmproxy has been added into the [community] repository. Use pacman to install it:

>>> sudo pacman -S mitmproxy



.. _install-source-ubuntu:

Installation from Source on Ubuntu
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Ubuntu comes with Python but we need to install pip3, python3-dev and several libraries.
This was tested on a fully patched installation of Ubuntu 16.04.

.. code:: bash

   sudo apt-get install python3-pip python3-dev libffi-dev libssl-dev libtiff5-dev libjpeg8-dev zlib1g-dev libwebp-dev
   sudo pip3 install mitmproxy  # or pip3 install --user mitmproxy

On older Ubuntu versions, e.g., **12.04** and **14.04**, you may need to install a newer version of Python.
mitmproxy requires Python 3.5 or higher. Please take a look at pyenv_.
Make sure to have an up-to-date version of pip by running ``pip3 install -U pip``.

.. _install-source-fedora:

Installation from Source on Fedora
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Fedora comes with Python but we need to install pip3, python3-dev and several libraries.
This was tested on a fully patched installation of Fedora 24.

.. code:: bash

   sudo dnf install make gcc redhat-rpm-config python3-pip python3-devel libffi-devel openssl-devel libtiff-devel libjpeg-devel zlib-devel libwebp-devel openjpeg2-devel
   sudo pip3 install mitmproxy  # or pip3 install --user mitmproxy

Make sure to have an up-to-date version of pip by running ``pip3 install -U pip``.

.. _install-source-windows:

🐱💻 Installation from Source on Windows
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. note::
    mitmproxy's console interface is not supported on Windows, but you can use mitmweb (the web-based interface) and mitmdump.

First, install the latest version of Python 3.5 or later from the `Python website`_. During installation, make sure to select `Add Python to PATH`. 

Now, you can install mitmproxy by running

.. code:: powershell

    pip3 install mitmproxy

.. _install-dev-version:

Latest Development Version
^^^^^^^^^^^^^^^^^^^^^^^^^^

If you would like to install mitmproxy directly from the master branch on GitHub or would like to
get set up to contribute to the project, install the dependencies as you would for a regular installation from source. Then see the Hacking_ section of the README on GitHub.
You can check your system information by running: ``mitmproxy --sysinfo``


.. _Hacking: https://github.com/mitmproxy/mitmproxy/blob/master/README.rst#hacking
.. _mitmproxy.org: https://mitmproxy.org/
.. _`Python website`: https://www.python.org/downloads/windows/
.. _pip: https://pip.pypa.io/en/latest/installing.html
.. _pyenv: https://github.com/yyuu/pyenv
.. _DockerHub: https://hub.docker.com/r/mitmproxy/mitmproxy/