The best way to install Man in the Middle proxy for Arch Linux is using pipenv. This is because Arch is a rolling reserve and when you update Python-related packages, you will experience errors.
sudo pacman -Sy python-pipenv git libffi
Then clone MITM
git clone https://github.com/mitmproxy/mitmproxy.git cd mitmproxy pipenv install pipenv run pip install pip setuptools pipenv run pip install -r requirements.txt
Now that you have a pyenv with the all the requirements, you can launch MITM, inside the pipenv, using:
pipenv run mitmweb
You can add a shortcut to mitmweb in your /home/user/bashrc file
alias mitmweb="cd /home/user/MITMPROXY/mitmproxy/ && pipenv run mitmweb" alias mitmdump="cd /home/user/MITMPROXY/mitmproxy/ && pipenv run mitmdump"
If you’re using docker you can run MITM proxy using the IP of the machine
ip neigh | grep 172 # only for docker users! pipenv run mitmweb --web-host 172.17.0.3
Using MITM Chrome Browser on Linux
Run MITM proxy using pipenv run
pipenv run /home/user/Downloads/mitmproxy/mitmweb
Install FoxyProxy for Chromium
https://chrome.google.com/webstore/detail/foxyproxy-standard/gcknhkkoolaabfmlnjonogaaifnjlfnp
Add New Proxy for localhost:8080
- localhost
- 8080
You may need to toggle “SOCKS”
Turn on the proxy in the top right in the extensions area
Open any browser and navigate to http://mitm.it/
If you don’t see the certificate download area (running on localhost), then make sure mitm is still on!
Download the Other file on the right
This will download your .pem file which we need to extract .crt from.
Extract the .crt using OpenSSL and then install that into your browser:
openssl x509 -in mitmproxy-ca-cert.pem -inform PEM -out mitmproxy-ca-cert.crt
Open Chromium and navigate to chrome://settings/certificates
Click Import and use the file you just created mitmproxy-ca-cert.crt
Then, you should see your MITMproxy light up!!