diff options
Diffstat (limited to 'libmproxy/cmdline.py')
-rw-r--r-- | libmproxy/cmdline.py | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py index 39b0bfa3..83eab7ee 100644 --- a/libmproxy/cmdline.py +++ b/libmproxy/cmdline.py @@ -1,6 +1,5 @@ from __future__ import absolute_import import re -import argparse from argparse import ArgumentTypeError from netlib import http from . import filt, utils @@ -156,7 +155,6 @@ def get_common_options(options): app=options.app, app_host=options.app_host, app_port=options.app_port, - app_external=options.app_external, anticache=options.anticache, anticomp=options.anticomp, @@ -177,6 +175,8 @@ def get_common_options(options): wfile=options.wfile, verbosity=options.verbose, nopop=options.nopop, + replay_ignore_content = options.replay_ignore_content, + replay_ignore_params = options.replay_ignore_params ) @@ -189,7 +189,7 @@ def common_options(parser): parser.add_argument( "--confdir", action="store", type=str, dest="confdir", default='~/.mitmproxy', - help="Configuration directory. (~/.mitmproxy)" + help="Configuration directory, contains default CA file. (~/.mitmproxy)" ) parser.add_argument( "--host", @@ -263,7 +263,7 @@ def common_options(parser): ) group.add_argument( "-I", "--ignore", - action="append", type=str, dest="ignore", default=[], + action="append", type=str, dest="ignore_hosts", default=[], metavar="HOST", help="Ignore host and forward all traffic without processing it. " "In transparent mode, it is recommended to use an IP address (range), not the hostname. " @@ -272,6 +272,13 @@ def common_options(parser): "Can be passed multiple times. " ) group.add_argument( + "--tcp", + action="append", type=str, dest="tcp_hosts", default=[], + metavar="HOST", + help="Generic TCP SSL proxy mode for all hosts that match the pattern. Similar to --ignore," + "but SSL connections are intercepted. The communication contents are printed to the event log in verbose mode." + ) + group.add_argument( "-n", action="store_true", dest="no_server", help="Don't start a proxy server." @@ -287,6 +294,11 @@ def common_options(parser): help="Forward all requests to upstream HTTP server: http[s][2http[s]]://host[:port]" ) group.add_argument( + "--socks", + action="store_true", dest="socks_proxy", default=False, + help="Set SOCKS5 proxy mode." + ) + group.add_argument( "-T", action="store_true", dest="transparent_proxy", default=False, help="Set transparent proxy mode." @@ -315,28 +327,23 @@ def common_options(parser): help="Override the HTTP request form sent upstream by the proxy" ) - group = parser.add_argument_group("Web App") + group = parser.add_argument_group("Onboarding App") group.add_argument( "-a", action="store_false", dest="app", default=True, - help="Disable the mitmproxy web app." + help="Disable the mitmproxy onboarding app." ) group.add_argument( "--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\ + help="Domain to serve the onboarding app from. For transparent mode, use an IP when\ a DNS entry for the app domain is not present. Default: %s" % APP_HOST ) group.add_argument( "--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." + help="Port to serve the onboarding app from." ) group = parser.add_argument_group("Client Replay") @@ -375,6 +382,17 @@ def common_options(parser): help="Disable response pop from response flow. " "This makes it possible to replay same response multiple times." ) + group.add_argument( + "--replay-ignore-content", + action="store_true", dest="replay_ignore_content", default=False, + help="Ignore request's content while searching for a saved flow to replay" + ) + group.add_argument( + "--replay-ignore-param", + action="append", dest="replay_ignore_params", type=str, + help="Request's parameters to be ignored while searching for a saved flow to replay" + "Can be passed multiple times." + ) group = parser.add_argument_group( "Replacements", |