From 0e993bec6f7fa77e73a08053f4558ff1fc36d022 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 17 Mar 2013 17:31:35 +1300 Subject: 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 --- libmproxy/console/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libmproxy/console/common.py') diff --git a/libmproxy/console/common.py b/libmproxy/console/common.py index 1cc0b5b9..d68aba3d 100644 --- a/libmproxy/console/common.py +++ b/libmproxy/console/common.py @@ -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, -- cgit v1.2.3