diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-10-18 09:31:56 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-10-18 20:13:45 +0200 |
commit | 85b5709ea5ce50423713e6847ee8cefb6001eee9 (patch) | |
tree | cf9b5dabf8bb1bdf99f49666b0a099e462709d8a /src/hydrilla | |
parent | 5014555438834ff4559abd1b646537229146a67a (diff) | |
download | haketilo-hydrilla-85b5709ea5ce50423713e6847ee8cefb6001eee9.tar.gz haketilo-hydrilla-85b5709ea5ce50423713e6847ee8cefb6001eee9.zip |
[proxy] only listen on address 127.0.0.1 by default
Diffstat (limited to 'src/hydrilla')
-rw-r--r-- | src/hydrilla/mitmproxy_launcher/launch.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hydrilla/mitmproxy_launcher/launch.py b/src/hydrilla/mitmproxy_launcher/launch.py index e0c559b..82766b9 100644 --- a/src/hydrilla/mitmproxy_launcher/launch.py +++ b/src/hydrilla/mitmproxy_launcher/launch.py @@ -50,6 +50,8 @@ addons = [HaketiloAddon()] ''' @click.command(help=_('cli_help.haketilo')) +@click.option('-l', '--listen-host', default='127.0.0.1', type=click.STRING, + help=_('cli_opt.haketilo.listen_host')) @click.option('-p', '--port', default=8080, type=click.IntRange(1, 65535), help=_('cli_opt.haketilo.port')) @click.option('-d', '--directory', default='~/.haketilo/', @@ -58,10 +60,7 @@ addons = [HaketiloAddon()] @click.version_option(version=_version.version, prog_name='Haketilo proxy', message=_('%(prog)s_%(version)s_license'), help=_('cli_opt.haketilo.version')) -def launch(port: int, directory: str): - """ - .... - """ +def launch(listen_host: str, port: int, directory: str): directory_path = Path(os.path.expanduser(directory)).resolve() directory_path.mkdir(parents=True, exist_ok=True) @@ -72,6 +71,7 @@ def launch(port: int, directory: str): sys.argv = [ 'mitmdump', + '--listen-host', listen_host, '-p', str(port), '--set', f'confdir={directory_path / "mitmproxy"}', '--set', 'upstream_cert=false', |