Encrypted proxy killswitch + TUN optimization #1

Open
zenaku wants to merge 54 commits from feature/merge-encrypted-proxy into master
Showing only changes of commit c93a8572a1 - Show all commits

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)