mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-05-08 02:28:50 +08:00
Add the --host option, which uses the value in the Host header for dispaly URLs.
- Can be toggled with "o" then "h" in mitmproxy - Useful for transparent mode
This commit is contained in:
@@ -177,7 +177,7 @@ class FlowCache:
|
||||
flowcache = FlowCache()
|
||||
|
||||
|
||||
def format_flow(f, focus, extended=False, padding=2):
|
||||
def format_flow(f, focus, extended=False, hostheader=False, padding=2):
|
||||
d = dict(
|
||||
intercepting = f.intercepting,
|
||||
|
||||
@@ -185,7 +185,7 @@ def format_flow(f, focus, extended=False, padding=2):
|
||||
req_is_replay = f.request.is_replay(),
|
||||
req_method = f.request.method,
|
||||
req_acked = f.request.reply.acked,
|
||||
req_url = f.request.get_url(),
|
||||
req_url = f.request.get_url(hostheader=hostheader),
|
||||
|
||||
err_msg = f.error.msg if f.error else None,
|
||||
resp_code = f.response.code if f.response else None,
|
||||
|
||||
Reference in New Issue
Block a user