feat: use SystemProfile path for sing-box config storage
This commit is contained in:
parent
89705bbab7
commit
8ef8f9e1c9
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue