mirror of
https://github.com/mitmproxy/mitmproxy.git
synced 2024-11-23 13:19:48 +00:00
docs: correct command to install mitmproxy
This commit is contained in:
parent
ba848e2040
commit
f47608c85e
@ -91,12 +91,14 @@ Set the test device up to use the host on which mitmproxy is running as the defa
|
||||
Follow steps **1, 2** as above, but *instead* of the commands in step **3**, run the following
|
||||
|
||||
Create a user to run the mitmproxy
|
||||
|
||||
{{< highlight bash >}}
|
||||
sudo useradd --create-home mitmproxyuser
|
||||
sudo -u mitmproxyuser 'cd ~ && pip install --user mitmproxy'
|
||||
sudo -u mitmproxyuser bash -c 'cd ~ && pip install --user mitmproxy'
|
||||
{{< / highlight >}}
|
||||
|
||||
Then, configure the iptables rules to redirect all traffic from our local machine to mitmproxy. **Note**, as soon as you run these, you won't be able to perform successful network calls *until* you start mitmproxy. If you run into issues, `iptables -t nat -F` is a heavy handed way to flush (clear) *all* the rules from the iptables `nat` table (which includes any other rules you had configured).
|
||||
|
||||
{{< highlight bash >}}
|
||||
iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner mitmproxyuser --dport 80 -j REDIRECT --to-port 8080
|
||||
iptables -t nat -A OUTPUT -p tcp -m owner ! --uid-owner mitmproxyuser --dport 443 -j REDIRECT --to-port 8080
|
||||
|
Loading…
Reference in New Issue
Block a user