Beispiel #1
0
def process_options(parser, options):
    if options.sysinfo:
        print(debug.sysinfo())
        sys.exit(0)
    if options.quiet:
        options.verbose = 0
    debug.register_info_dumpers()
    return config.process_proxy_options(parser, options)
Beispiel #2
0
def process_options(parser, options, args):
    if args.sysinfo:
        print(debug.sysinfo())
        sys.exit(0)
    if args.quiet:
        args.verbose = 0
    debug.register_info_dumpers()
    return config.ProxyConfig(options)
Beispiel #3
0
def process_options(parser, options):
    if options.sysinfo:
        print(debug.sysinfo())
        sys.exit(0)
    if options.quiet:
        options.verbose = 0
    debug.register_info_dumpers()
    return config.process_proxy_options(parser, options)
Beispiel #4
0
def process_options(parser, options, args):
    if args.sysinfo:
        print(debug.sysinfo())
        sys.exit(0)
    debug.register_info_dumpers()
    pconf = config.ProxyConfig(options)
    if options.no_server:
        return server.DummyServer(pconf)
    else:
        try:
            return server.ProxyServer(pconf)
        except exceptions.ServerException as v:
            print(str(v), file=sys.stderr)
            sys.exit(1)
Beispiel #5
0
def process_options(parser, options, args):
    if args.sysinfo:
        print(debug.sysinfo())
        sys.exit(0)
    debug.register_info_dumpers()
    pconf = config.ProxyConfig(options)
    if options.no_server:
        return server.DummyServer(pconf)
    else:
        try:
            return server.ProxyServer(pconf)
        except exceptions.ServerException as v:
            print(str(v), file=sys.stderr)
            sys.exit(1)
Beispiel #6
0
 def process_options(parser, options, args):
     from mitmproxy.proxy import server
     if args.sysinfo:
         print(debug.sysinfo())
     try:
         debug.register_info_dumpers()
     except Exception as e:
         print(str(e))
     pconf = config.ProxyConfig(options)
     if options.no_server:
         return server.DummyServer(pconf)
     else:
         try:
             return server.ProxyServer(pconf)
         except exceptions.ServerException as v:
             print(str(v))
             return
Beispiel #7
0
def test_sysinfo():
    assert debug.sysinfo()