feat(cli): add option to display only the web panel URL

This commit is contained in:
MiliAxe
2025-12-31 13:09:02 +03:30
parent abd6084734
commit 6ab408c1d3

View File

@ -670,9 +670,13 @@ def stop_webpanel_decoy():
click.echo(f'{e}', err=True)
@cli.command('get-webpanel-url')
def get_web_panel_url():
@click.option('--url-only', is_flag=True, help='Only display the URL without additional text')
def get_web_panel_url(url_only: bool):
try:
url = cli_api.get_webpanel_url()
if url_only:
click.echo(url)
else:
click.echo(f'Hysteria web panel is now running. The service is accessible on: {url}')
except Exception as e:
click.echo(f'{e}', err=True)