mirror of
https://github.com/mitmproxy/mitmproxy.git
synced 2024-11-28 07:40:41 +00:00
allow passing custom argv to libmproxy.main
This commit is contained in:
parent
5977e844e7
commit
2242c671fd
@ -75,14 +75,14 @@ def get_server(dummy_server, options):
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def mitmproxy(): # pragma: nocover
|
||||
def mitmproxy(args=None): # pragma: nocover
|
||||
from . import console
|
||||
|
||||
check_versions()
|
||||
assert_utf8_env()
|
||||
|
||||
parser = cmdline.mitmproxy()
|
||||
options = parser.parse_args()
|
||||
options = parser.parse_args(args)
|
||||
if options.quiet:
|
||||
options.verbose = 0
|
||||
|
||||
@ -101,13 +101,13 @@ def mitmproxy(): # pragma: nocover
|
||||
pass
|
||||
|
||||
|
||||
def mitmdump(): # pragma: nocover
|
||||
def mitmdump(args=None): # pragma: nocover
|
||||
from . import dump
|
||||
|
||||
check_versions()
|
||||
|
||||
parser = cmdline.mitmdump()
|
||||
options = parser.parse_args()
|
||||
options = parser.parse_args(args)
|
||||
if options.quiet:
|
||||
options.verbose = 0
|
||||
options.flow_detail = 0
|
||||
@ -135,13 +135,13 @@ def mitmdump(): # pragma: nocover
|
||||
pass
|
||||
|
||||
|
||||
def mitmweb(): # pragma: nocover
|
||||
def mitmweb(args=None): # pragma: nocover
|
||||
from . import web
|
||||
|
||||
check_versions()
|
||||
parser = cmdline.mitmweb()
|
||||
|
||||
options = parser.parse_args()
|
||||
options = parser.parse_args(args)
|
||||
if options.quiet:
|
||||
options.verbose = 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user