From cea443f21c40b522a8fe619355ca5a8d618730e9 Mon Sep 17 00:00:00 2001 From: Lucas Ramage Date: Sun, 5 Apr 2020 10:36:09 -0400 Subject: Rename web-iface to web-host Bug: https://github.com/mitmproxy/mitmproxy/issues/3891 --- mitmproxy/tools/cmdline.py | 2 +- mitmproxy/tools/web/master.py | 4 ++-- mitmproxy/tools/web/webaddons.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'mitmproxy') diff --git a/mitmproxy/tools/cmdline.py b/mitmproxy/tools/cmdline.py index e9ff973f..9c8eae8a 100644 --- a/mitmproxy/tools/cmdline.py +++ b/mitmproxy/tools/cmdline.py @@ -127,7 +127,7 @@ def mitmweb(opts): group = parser.add_argument_group("Mitmweb") opts.make_parser(group, "web_open_browser") opts.make_parser(group, "web_port", metavar="PORT") - opts.make_parser(group, "web_iface", metavar="INTERFACE") + opts.make_parser(group, "web_host", metavar="HOST") common_options(parser, opts) group = parser.add_argument_group( diff --git a/mitmproxy/tools/web/master.py b/mitmproxy/tools/web/master.py index 17845106..d127bdec 100644 --- a/mitmproxy/tools/web/master.py +++ b/mitmproxy/tools/web/master.py @@ -105,8 +105,8 @@ class WebMaster(master.Master): AsyncIOMainLoop().install() iol = tornado.ioloop.IOLoop.instance() http_server = tornado.httpserver.HTTPServer(self.app) - http_server.listen(self.options.web_port, self.options.web_iface) - web_url = "http://{}:{}/".format(self.options.web_iface, self.options.web_port) + http_server.listen(self.options.web_port, self.options.web_host) + web_url = "http://{}:{}/".format(self.options.web_host, self.options.web_port) self.log.info( "Web server listening at {}".format(web_url), ) diff --git a/mitmproxy/tools/web/webaddons.py b/mitmproxy/tools/web/webaddons.py index ba3bdead..bd85651a 100644 --- a/mitmproxy/tools/web/webaddons.py +++ b/mitmproxy/tools/web/webaddons.py @@ -18,13 +18,13 @@ class WebAddon: "Web UI port." ) loader.add_option( - "web_iface", str, "127.0.0.1", - "Web UI interface." + "web_host", str, "127.0.0.1", + "Web UI host." ) def running(self): if hasattr(ctx.options, "web_open_browser") and ctx.options.web_open_browser: - web_url = "http://{}:{}/".format(ctx.options.web_iface, ctx.options.web_port) + web_url = "http://{}:{}/".format(ctx.options.web_host, ctx.options.web_port) success = open_browser(web_url) if not success: ctx.log.info( -- cgit v1.2.3