From 896ba3421f14ac4a6000e98f03efa318dfcfc7d0 Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Sat, 22 Feb 2025 00:24:22 +0330 Subject: [PATCH] feat: Restore backup CLI --- core/cli.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/cli.py b/core/cli.py index 0828c61..779e3a6 100644 --- a/core/cli.py +++ b/core/cli.py @@ -87,6 +87,16 @@ def backup_hysteria2(): except Exception as e: click.echo(f'{e}', err=True) +@cli.command('restore-hysteria2') +@click.argument('backup_file_path', type=click.Path(exists=True, file_okay=True, dir_okay=False, readable=True)) +def restore_hysteria2(backup_file_path): + """Restores Hysteria configuration from a backup ZIP file.""" + try: + cli_api.restore_hysteria2(backup_file_path) + click.echo('Hysteria configuration restored successfully.') + except Exception as e: + click.echo(f'{e}', err=True) + # endregion # region User