diff options
Diffstat (limited to 'src')
-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', |