diff options
author | Maximilian Hils <git@maximilianhils.com> | 2013-08-17 13:30:36 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2013-08-17 13:30:36 +0200 |
commit | 729677cd85cffedec8f481f1b6025f00fb637e13 (patch) | |
tree | 39c245643c5a3a48bd14c6e13757148bda54e2f3 /libmproxy/cmdline.py | |
parent | 6fe175913e611097fdfdf0a6b20b1c05909374e1 (diff) | |
parent | a558c016d4430b67d221a369abe0cde1f4a40fce (diff) | |
download | mitmproxy-729677cd85cffedec8f481f1b6025f00fb637e13.tar.gz mitmproxy-729677cd85cffedec8f481f1b6025f00fb637e13.tar.bz2 mitmproxy-729677cd85cffedec8f481f1b6025f00fb637e13.zip |
Merge branch 'master' into 0.10
Diffstat (limited to 'libmproxy/cmdline.py')
-rw-r--r-- | libmproxy/cmdline.py | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py index 8dae9365..53926028 100644 --- a/libmproxy/cmdline.py +++ b/libmproxy/cmdline.py @@ -1,24 +1,12 @@ -# Copyright (C) 2012 Aldo Cortesi -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - import proxy import re, filt import argparse import shlex import os +APP_DOMAIN = "mitm" +APP_IP = "1.1.1.1" + class ParseException(Exception): pass class OptionException(Exception): pass @@ -141,6 +129,10 @@ def get_common_options(options): setheaders.append(p) return dict( + app = options.app, + app_ip = options.app_ip, + app_domain = options.app_domain, + anticache = options.anticache, anticomp = options.anticomp, client_replay = options.client_replay, @@ -270,6 +262,17 @@ def common_options(parser): action="store_true", dest="app", default=False, 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." + ) + 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.""" + ) group = parser.add_argument_group("Client Replay") group.add_argument( |