aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/cmdline.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2013-08-18 20:03:53 +0200
committerMaximilian Hils <git@maximilianhils.com>2013-08-18 20:03:53 +0200
commitbb4748fb8f5dd5ef6bc7bf70ee4e6db7ad019f28 (patch)
tree40962be66f79b0daffa2232439ea525d8cda5f00 /libmproxy/cmdline.py
parent729677cd85cffedec8f481f1b6025f00fb637e13 (diff)
downloadmitmproxy-bb4748fb8f5dd5ef6bc7bf70ee4e6db7ad019f28.tar.gz
mitmproxy-bb4748fb8f5dd5ef6bc7bf70ee4e6db7ad019f28.tar.bz2
mitmproxy-bb4748fb8f5dd5ef6bc7bf70ee4e6db7ad019f28.zip
add option to expose webapp externally, remove distinct ip setting
Diffstat (limited to 'libmproxy/cmdline.py')
-rw-r--r--libmproxy/cmdline.py27
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")