26-05-16-6:29
This commit is contained in:
parent
6849f1a46f
commit
f38aa3b6f1
127 changed files with 383 additions and 31 deletions
|
|
@ -72,7 +72,7 @@ def enable_hysteria(username: str, password: str, server_host: str,
|
|||
real_ip = get_real_ip()
|
||||
runner = SingboxRunner()
|
||||
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)
|
||||
try:
|
||||
runner.write_config(config_path, config)
|
||||
|
|
@ -99,4 +99,4 @@ def disable_hysteria(observer=None) -> bool:
|
|||
SingboxRunner().stop()
|
||||
if observer:
|
||||
observer.notify("disconnected", {})
|
||||
return True
|
||||
return True
|
||||
|
|
@ -100,7 +100,7 @@ def enable_vless(vless_link: str, username: str,
|
|||
real_ip = get_real_ip()
|
||||
runner = SingboxRunner()
|
||||
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)
|
||||
try:
|
||||
runner.write_config(config_path, config)
|
||||
|
|
@ -127,4 +127,4 @@ def disable_vless(observer=None) -> bool:
|
|||
SingboxRunner().stop()
|
||||
if observer:
|
||||
observer.notify("disconnected", {})
|
||||
return True
|
||||
return True
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue