feat(core): add status check for masquerade

This commit is contained in:
ReturnFI
2025-11-30 21:00:12 +00:00
parent 0949afcb6c
commit f9172252f7
4 changed files with 43 additions and 28 deletions

View File

@ -231,11 +231,15 @@ def check_hysteria2_obfs():
def enable_hysteria2_masquerade():
'''Enables masquerade for Hysteria2.'''
run_cmd(['python3', Command.MASQUERADE_SCRIPT.value, '1'])
return run_cmd(['python3', Command.MASQUERADE_SCRIPT.value, '1'])
def disable_hysteria2_masquerade():
'''Disables masquerade for Hysteria2.'''
run_cmd(['python3', Command.MASQUERADE_SCRIPT.value, '2'])
return run_cmd(['python3', Command.MASQUERADE_SCRIPT.value, '2'])
def get_hysteria2_masquerade_status():
'''Gets the current masquerade status for Hysteria2.'''
return run_cmd(['python3', Command.MASQUERADE_SCRIPT.value, 'status'])
def get_hysteria2_config_file() -> dict[str, Any]: