mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
commit
079374dec8
@ -246,15 +246,9 @@ tproxy_user = "nobody"
|
||||
#This cannot involve the user which runs the
|
||||
#transparent proxy as that would cause an infinite loop.
|
||||
#
|
||||
#Here we redirect for all users which don't run transparent proxy.
|
||||
redir_users = "{ !=" $tproxy_user "}"
|
||||
|
||||
#If you only wish to redirect traffic for particular users
|
||||
#you may also do:
|
||||
#redir_users = "{= john, = jane}"
|
||||
|
||||
rdr pass proto tcp from any to any port $redir_ports -> $tproxy
|
||||
pass out route-to (lo0 127.0.0.1) proto tcp from any to any port $redir_ports user $redir_users
|
||||
pass out route-to (lo0 127.0.0.1) proto tcp from any to any port $redir_ports user { != $tproxy_user }
|
||||
{{< / highlight >}}
|
||||
|
||||
Follow steps **3-5** above. This will redirect the packets from all users other than `nobody` on the machine to mitmproxy. To avoid circularity, run mitmproxy as the user `nobody`. Hence step **6** should look like:
|
||||
|
Loading…
Reference in New Issue
Block a user