Start a command (cmd command line input): mitmdump -p port number
mitmdump -s test.py -p port number
mitmdump -s test.py -p port number --mode upstream: ip address --upstream-auth proxy authentication information (pass books: access keys)
test.py
from mitmproxy import ctx # 格式必须是这样 def request(flow): # print(flow.request.headers) ctx.log.info(str(flow.request.headers)) ctx.log.warn(str(flow.request.headers)) ctx.log.error(str(flow.request.headers))