26-05-16-6:29

This commit is contained in:
Zenaku 2026-05-26 18:29:24 -05:00
parent 6849f1a46f
commit f38aa3b6f1
127 changed files with 383 additions and 31 deletions

View file

@ -72,7 +72,7 @@ def enable_hysteria(username: str, password: str, server_host: str,
real_ip = get_real_ip() real_ip = get_real_ip()
runner = SingboxRunner() runner = SingboxRunner()
runner.stop() runner.stop()
config_path = Path(Constants.HV_DATA_HOME) / f"{username}-sing-box.json" config_path = Path(Constants.SINGBOX_CONFIG_DIR) / f"{username}-sing-box.json"
config = build_hysteria_config(username, password, server_host, socks5_port) config = build_hysteria_config(username, password, server_host, socks5_port)
try: try:
runner.write_config(config_path, config) runner.write_config(config_path, config)
@ -99,4 +99,4 @@ def disable_hysteria(observer=None) -> bool:
SingboxRunner().stop() SingboxRunner().stop()
if observer: if observer:
observer.notify("disconnected", {}) observer.notify("disconnected", {})
return True return True

View file

@ -100,7 +100,7 @@ def enable_vless(vless_link: str, username: str,
real_ip = get_real_ip() real_ip = get_real_ip()
runner = SingboxRunner() runner = SingboxRunner()
runner.stop() runner.stop()
config_path = Path(Constants.HV_DATA_HOME) / f"{username}-sing-box.json" config_path = Path(Constants.SINGBOX_CONFIG_DIR) / f"{username}-sing-box.json"
config = build_vless_config(vless, socks5_port) config = build_vless_config(vless, socks5_port)
try: try:
runner.write_config(config_path, config) runner.write_config(config_path, config)
@ -127,4 +127,4 @@ def disable_vless(observer=None) -> bool:
SingboxRunner().stop() SingboxRunner().stop()
if observer: if observer:
observer.notify("disconnected", {}) observer.notify("disconnected", {})
return True return True

Some files were not shown because too many files have changed in this diff Show more