diff options
author | Aldo Cortesi <aldo@corte.si> | 2013-12-08 01:09:46 -0800 |
---|---|---|
committer | Aldo Cortesi <aldo@corte.si> | 2013-12-08 01:09:46 -0800 |
commit | 7aeaf9d4488d57c012cd1252ba5d0b2d6dcd1894 (patch) | |
tree | 6500a7d1c84226d343227244642ae29e2c9e4205 /libmproxy/cmdline.py | |
parent | 2956c144d30558141ec43bec798a424974ffa6f1 (diff) | |
parent | bb4748fb8f5dd5ef6bc7bf70ee4e6db7ad019f28 (diff) | |
download | mitmproxy-7aeaf9d4488d57c012cd1252ba5d0b2d6dcd1894.tar.gz mitmproxy-7aeaf9d4488d57c012cd1252ba5d0b2d6dcd1894.tar.bz2 mitmproxy-7aeaf9d4488d57c012cd1252ba5d0b2d6dcd1894.zip |
Merge pull request #161 from mitmproxy/external_webapp
External webapp
Diffstat (limited to 'libmproxy/cmdline.py')
-rw-r--r-- | libmproxy/cmdline.py | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py index 53926028..127affc9 100644 --- a/libmproxy/cmdline.py +++ b/libmproxy/cmdline.py @@ -4,8 +4,8 @@ import argparse import shlex import os -APP_DOMAIN = "mitm" -APP_IP = "1.1.1.1" +APP_HOST = "mitm" +APP_PORT = 80 class ParseException(Exception): pass class OptionException(Exception): pass @@ -130,8 +130,9 @@ def get_common_options(options): return dict( app = options.app, - app_ip = options.app_ip, - app_domain = options.app_domain, + app_host = options.app_host, + app_port = options.app_port, + app_external = options.app_external, anticache = options.anticache, anticomp = options.anticomp, @@ -263,15 +264,19 @@ def common_options(parser): help="Enable the mitmproxy web app." ) group.add_argument( - "--appdomain", - action="store", dest="app_domain", default=APP_DOMAIN, metavar="domain", - help="Domain to serve the app from." + "--app-host", + action="store", dest="app_host", default=APP_HOST, metavar="host", + help="Domain to serve the app from. For transparent mode, use an IP when a DNS entry for the app domain is not present." ) group.add_argument( - "--appip", - action="store", dest="app_ip", default=APP_IP, metavar="ip", - help="""IP to serve the app from. Useful for transparent mode, when a DNS - entry for the app domain is not present.""" + "--app-port", + action="store", dest="app_port", default=APP_PORT, type=int, metavar="80", + help="Port to serve the app from." + ) + group.add_argument( + "--app-external", + action="store_true", dest="app_external", + help="Serve the app outside of the proxy." ) group = parser.add_argument_group("Client Replay") |