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>
This commit is contained in:
parent
35ca2b896e
commit
f598c3056d
@ -83,6 +83,12 @@ class ListenCommand(CliCommand):
|
||||
|
||||
@classmethod
|
||||
def setup_arguments(cls, parser: argparse.ArgumentParser) -> None:
|
||||
parser.add_argument(
|
||||
"-h", "--host",
|
||||
metavar="HOST",
|
||||
help="Host to listen on.",
|
||||
default=str(cm().listen_host or "127.0.0.1"),
|
||||
)
|
||||
parser.add_argument(
|
||||
"-p", "--port",
|
||||
metavar="PORT",
|
||||
@ -109,6 +115,7 @@ class ListenCommand(CliCommand):
|
||||
tw.exec(
|
||||
[
|
||||
("listen",
|
||||
f"host={args.host}",
|
||||
f"port={args.port}",
|
||||
f"username={args.username}",
|
||||
f"password={args.password}")
|
||||
|
Loading…
Reference in New Issue
Block a user