Implement /restore API

This commit is contained in:
Iam54r1n4
2025-02-22 10:01:16 +03:30
parent 4dd9215d1b
commit c399551a50
3 changed files with 110 additions and 57 deletions

View File

@ -180,7 +180,8 @@ def backup_hysteria2():
except Exception as ex:
raise
def restore_hysteria2(backup_file_path):
def restore_hysteria2(backup_file_path: str):
'''Restores Hysteria configuration from the given backup file.'''
try:
run_cmd(['bash', Command.RESTORE_HYSTERIA2.value, backup_file_path])