This commit is contained in:
Zenaku 2026-05-25 01:06:53 +00:00
parent db8a0f0c74
commit c93a8572a1

View file

@ -1,10 +1,7 @@
from pathlib import Path
from core.services.encrypted_proxy.hysteria_service import enable_hysteria, disable_hysteria
class HysteriaController:
def __init__(self, config_dir: Path, socks5_port: int):
self.config_dir = config_dir
def __init__(self, socks5_port: int):
self.socks5_port = socks5_port
def enable(self, username: str, password: str,
@ -21,10 +18,9 @@ class HysteriaController:
username=username,
password=password,
server_host=server_host,
config_dir=self.config_dir,
socks5_port=self.socks5_port,
observer=observer,
)
def disable(self, observer=None) -> bool:
return disable_hysteria(observer=observer)
return disable_hysteria(observer=observer)