mitmproxy/docs/install.rst

160 lines
4.5 KiB
ReStructuredText
Raw Normal View History

2015-09-04 14:17:55 +00:00
.. _install:
Installation
============
Please follow the steps for your operating system.
2015-09-04 14:17:55 +00:00
2016-12-21 21:27:51 +00:00
Once installation is complete, you can run :ref:`mitmproxy`, :ref:`mitmdump` or
:ref:`mitmweb` from a terminal.
2015-09-04 14:17:55 +00:00
.. _install-macos:
Installation on macOS
---------------------
2017-09-02 10:56:45 +00:00
The recommended way to install mitmproxy on macOS is to use `Homebrew`_:
2015-09-04 14:17:55 +00:00
.. code:: bash
brew install mitmproxy
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
Alternatively you can download our :ref:`binary-packages` from our `releases`_
page.
2016-02-05 21:59:24 +00:00
2015-09-04 14:17:55 +00:00
.. _install-linux:
Installation on Linux
---------------------
2016-12-10 19:44:27 +00:00
2017-09-02 10:56:45 +00:00
The recommended way to install mitmproxy on Linux is to download our
:ref:`binary-packages` from our `releases`_ page.
2017-09-02 10:56:45 +00:00
Some Linux distributions and their community provide mitmproxy packages via
their native package repositories (e.g., Arch Linux, Debian, Ubuntu, Kali Linux,
OpenSUSE, etc.). While we do encourage seeing mitmproxy in a great variety of
repositories and distributions, we are not maintaining or involved with their
downstream packaging efforts. If you are looking for the latest version or have
other problems, please contact the repository maintainers directly.
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
.. _install-windows:
2016-12-10 19:44:27 +00:00
2017-09-02 10:56:45 +00:00
Installation on Windows
-----------------------
2017-09-02 10:56:45 +00:00
The recommended way to install mitmproxy on Windows is to download our
:ref:`binary-packages` from our `releases`_ page.
2017-09-02 10:56:45 +00:00
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.
2017-09-02 10:56:45 +00:00
.. note::
The console interface is not supported on Windows, but you can
use `mitmweb` (the web-based interface) and `mitmdump`.
2017-09-02 10:56:45 +00:00
.. _install-advanced:
Advanced Installation
---------------------
2017-09-02 10:56:45 +00:00
.. _binary-packages:
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
Self-contained Pre-built Binary Packages
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
For some platforms we provide pre-built binary packages containing ready-to-run
executables. This includes a self-contained Python 3 environment, a recent
OpenSSL that support ALPN and HTTP/2, and other dependencies that would
otherwise we cumbersome to compile and install.
2016-12-11 16:49:07 +00:00
2017-09-02 10:56:45 +00:00
Please be advised that we do not updates these binaries after the initial
release. This means we do not include security-related updates of our
dependencies in already released mitmproxy versions. If there is a severe issue,
we might consider releasing a bugfix release of mitmproxy and corresponding
binary packages.
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
We only support the latest version of mitmproxy with bugfix and security updates
through regular minor releases.
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
.. _install-docker:
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
Docker Images
^^^^^^^^^^^^^
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
You can use the official mitmproxy images from `DockerHub`_. The same security
considerations apply as for our binary packages.
2016-12-21 21:27:51 +00:00
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
.. _install-linux-pip3:
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
Installation on Linux via pip3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
Please make sure to install Python 3.5 (or higher) and pip3 for your
distribtion. If your distribution does not provide a suitable Python version,
you can use `pyenv`_ to get a recent Python environment.
2015-09-04 14:17:55 +00:00
.. code:: bash
2017-09-02 10:56:45 +00:00
sudo apt install python3-pip # Debian 8 or higher, Ubuntu 16.04 or higher
sudo dnf install python3-pip # Fedora 24 or higher
sudo pacman -S python-pip # Arch Linux
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
Please make sure to upgrade pip3 itself:
2016-12-21 21:27:51 +00:00
2017-09-02 10:56:45 +00:00
.. code:: bash
2017-03-08 16:42:19 +00:00
2017-09-02 10:56:45 +00:00
sudo pip3 install -U pip
2017-03-08 16:42:19 +00:00
2017-09-02 10:56:45 +00:00
Now you can install mitmproxy via pip3:
2017-03-08 16:42:19 +00:00
.. code:: bash
2017-09-02 10:56:45 +00:00
sudo pip3 install mitmproxy
2016-12-21 21:27:51 +00:00
2017-09-02 10:56:45 +00:00
.. _install-windows-pip3:
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
Installation on Windows via pip3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
2017-09-02 10:56:45 +00:00
The console interface is not supported on Windows, but you can
use `mitmweb` (the web-based interface) and `mitmdump`.
2016-12-11 16:49:07 +00:00
2017-09-02 10:56:45 +00:00
First, install the latest version of Python 3.5 or higher from the `Python
website`_. During installation, make sure to select `Add Python to PATH`. There
are no other dependencies on Windows.
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
Now you can install mitmproxy via pip3:
2015-09-04 14:17:55 +00:00
2016-12-10 19:44:27 +00:00
.. code:: powershell
2016-12-11 16:49:07 +00:00
pip3 install mitmproxy
2016-12-10 19:44:27 +00:00
2016-12-21 21:27:51 +00:00
2017-09-02 10:56:45 +00:00
.. _install-from-source:
2016-12-10 19:44:27 +00:00
2017-09-02 10:56:45 +00:00
Installation from Source Code
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2015-09-04 14:17:55 +00:00
2017-09-02 10:56:45 +00:00
If you would like to install mitmproxy directly from source code or the GitHub
master branch, please see the our README_ on GitHub.
2015-09-04 14:17:55 +00:00
.. _README: https://github.com/mitmproxy/mitmproxy/blob/master/README.rst
2017-09-02 10:56:45 +00:00
.. _releases: https://github.com/mitmproxy/mitmproxy/releases/latest
2015-09-04 14:17:55 +00:00
.. _mitmproxy.org: https://mitmproxy.org/
.. _`Python website`: https://www.python.org/downloads/windows/
2015-09-07 08:52:18 +00:00
.. _pip: https://pip.pypa.io/en/latest/installing.html
2016-12-10 19:44:27 +00:00
.. _pyenv: https://github.com/yyuu/pyenv
.. _DockerHub: https://hub.docker.com/r/mitmproxy/mitmproxy/
2017-09-02 10:56:45 +00:00
.. _Homebrew: https://brew.sh/