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:
Aldo Cortesi
2013-03-17 17:31:35 +13:00
parent 790ad468e4
commit 0e993bec6f
9 changed files with 56 additions and 8 deletions

View File

@@ -154,6 +154,7 @@ def get_common_options(options):
script = options.script,
stickycookie = stickycookie,
stickyauth = stickyauth,
showhost = options.showhost,
wfile = options.wfile,
verbosity = options.verbose,
nopop = options.nopop,
@@ -248,6 +249,11 @@ def common_options(parser):
help="Byte size limit of HTTP request and response bodies."\
" Understands k/m/g suffixes, i.e. 3m for 3 megabytes."
)
parser.add_argument(
"--host",
action="store_true", dest="showhost", default=False,
help="Use the Host header to construct URLs for display."
)
parser.add_argument(
"--no-upstream-cert", default=False,