feat: Add --check flag to manage_obfs CLI command

Integrates the OBFS status check functionality into the main CLI.
Users can now use `cli.py manage_obfs --check` to see if OBFS is active.
This commit is contained in:
Whispering Wind
2025-06-02 00:16:41 +03:30
committed by GitHub
parent 3ddb981077
commit 228e01f6e9
2 changed files with 17 additions and 7 deletions

View File

@ -218,6 +218,10 @@ def disable_hysteria2_obfs():
'''Removes 'obfs' from Hysteria2 configuration.'''
run_cmd(['python3', Command.MANAGE_OBFS.value, '--remove'])
def check_hysteria2_obfs():
'''Removes 'obfs' from Hysteria2 configuration.'''
result = subprocess.run(["python3", Command.MANAGE_OBFS.value, "--check"], check=True, capture_output=True, text=True)
return result.stdout.strip()
def enable_hysteria2_masquerade(domain: str):
'''Enables masquerade for Hysteria2.'''