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 8ef8f9e1c9 - Show all commits

View file

@ -1,5 +1,6 @@
from urllib.parse import unquote
from pathlib import Path
from core.Constants import Constants
from core.utils.encrypted_proxy.net import get_real_ip, verify_ip
from core.utils.encrypted_proxy.singbox import SingboxRunner
@ -103,7 +104,7 @@ def enable_vless(vless_link: str, username: str, config_dir: Path,
real_ip = get_real_ip()
runner = SingboxRunner()
runner.stop()
config_path = config_dir / f"{username}-sing-box.json"
config_path = Path(Constants.HV_DATA_HOME) / f"{username}-sing-box.json"
config = build_vless_config(vless, socks5_port)
try:
runner.write_config(config_path, config)