refactor domain into expose

pull/293/head
Ben Xu 5 months ago
parent 8f08dc2f8a
commit 7182f10c38

@ -34,7 +34,11 @@ def run(
tunnel_service: str = typer.Option( tunnel_service: str = typer.Option(
"ngrok", "--tunnel-service", help="Specify the tunnel service" "ngrok", "--tunnel-service", help="Specify the tunnel service"
), ),
expose: bool = typer.Option(False, "--expose", help="Expose server to internet"), expose: str = typer.Option(
'',
"--expose",
help="Expose localhost to internet with auth and optional custom domain if specified",
),
client: bool = typer.Option(False, "--client", help="Run client"), client: bool = typer.Option(False, "--client", help="Run client"),
server_url: str = typer.Option( server_url: str = typer.Option(
None, None,
@ -47,9 +51,6 @@ def run(
qr: bool = typer.Option( qr: bool = typer.Option(
False, "--qr", help="Display QR code to scan to connect to the server" False, "--qr", help="Display QR code to scan to connect to the server"
), ),
domain: str = typer.Option(
None, "--domain", help="Connect ngrok to a custom domain"
),
profiles: bool = typer.Option( profiles: bool = typer.Option(
False, False,
"--profiles", "--profiles",
@ -80,7 +81,6 @@ def run(
client_type=client_type, client_type=client_type,
qr=qr, qr=qr,
debug=debug, debug=debug,
domain=domain,
profiles=profiles, profiles=profiles,
profile=profile, profile=profile,
livekit=livekit, livekit=livekit,
@ -92,13 +92,12 @@ def _run(
server_host: str = "0.0.0.0", server_host: str = "0.0.0.0",
server_port: int = 10001, server_port: int = 10001,
tunnel_service: str = "bore", tunnel_service: str = "bore",
expose: bool = False, expose: str = '',
client: bool = False, client: bool = False,
server_url: str = None, server_url: str = None,
client_type: str = "auto", client_type: str = "auto",
qr: bool = False, qr: bool = False,
debug: bool = False, debug: bool = False,
domain = None,
profiles = None, profiles = None,
profile = None, profile = None,
livekit: bool = False, livekit: bool = False,
@ -165,7 +164,7 @@ def _run(
if expose: if expose:
tunnel_thread = threading.Thread( tunnel_thread = threading.Thread(
target=create_tunnel, args=[tunnel_service, server_host, server_port, qr, domain] target=create_tunnel, args=[tunnel_service, server_host, server_port, qr]
) )
tunnel_thread.start() tunnel_thread.start()

Loading…
Cancel
Save