Compare commits

...

3 Commits

Author SHA1 Message Date
77886cb1c6 Merge branch 'allow-specifying-listening-host' 2022-03-12 02:32:57 +01:00
57394668be Merge branch 'privatization-fixes' 2022-03-12 02:32:46 +01:00
3b1f91bcb0 Allow setting the host parameter
In order to run in a Docker container, it is necessary to listen on all interfaces (`0.0.0.0`).
So make it possible to set the host.

Fixes #1

Signed-off-by: Jacob Kiers <code@kiers.eu>
2022-03-12 02:31:57 +01:00

View File

@ -83,6 +83,12 @@ class ListenCommand(CliCommand):
@classmethod @classmethod
def setup_arguments(cls, parser: argparse.ArgumentParser) -> None: def setup_arguments(cls, parser: argparse.ArgumentParser) -> None:
parser.add_argument(
"--host",
metavar="HOST",
help="Host to listen on.",
default=str(cm().listen_host or "127.0.0.1"),
)
parser.add_argument( parser.add_argument(
"-p", "--port", "-p", "--port",
metavar="PORT", metavar="PORT",
@ -109,6 +115,7 @@ class ListenCommand(CliCommand):
tw.exec( tw.exec(
[ [
("listen", ("listen",
f"host={args.host}",
f"port={args.port}", f"port={args.port}",
f"username={args.username}", f"username={args.username}",
f"password={args.password}") f"password={args.password}")