mitmproxy mitmdump mitmweb的命令行用法

命令靠用

mitmproxy 命令行交付调用
mitmdump 命令行脚本
mitmweb web交互

关键参数是通用的,推荐是mitmdump 或者 mitmweb

强大的set参数

--set 'map_remote=/abc/cde'
--set 'modify_body=/"stream"

modify_body modify_body
mitmproxy mitmdump mitmweb sequence of str Replacement pattern of the form “[/flow-filter]/regex/[@]replacement”, where the separator can be any character. The @ allows to provide a file path that is used to read the replacement string.
Default:
modify_headers modify_headers
mitmproxy mitmdump mitmweb sequence of str Header modify pattern of the form “[/flow-filter]/header-name/[@]header-value”, where the separator can be any character. The @ allows to provide a file path that is used to read the header value string. An empty header-value removes existing header-name headers.
Default:

过滤表达式

https://docs.mitmproxy.org/stable/concepts-filters/

map remote修改请求路径

mitmweb --web-port 8080 -p 8081 -m reverse:http://127.0.0.1:8002 --set 'map_remote=/abc/cde'

修改请求内容

mitmweb --web-port 8080 -p 8081 -m reverse:http://127.0.0.1:8002 --set 'modify_body=/"stream": true/"stream": false' 

参考

https://docs.mitmproxy.org/stable/concepts-options/

https://docs.mitmproxy.org/stable/concepts-filters/