This commit is contained in:
2025-12-24 00:32:59 +03:00
parent 2d61830d08
commit 2a107b64e6
2 changed files with 20 additions and 9 deletions

View File

@@ -14,8 +14,9 @@ from pathlib import Path
PORT = 3456
APP_DIR = Path(__file__).parent
WEB_DIR = APP_DIR / "web"
DATA_DIR = APP_DIR / "data"
BASE_DIR = APP_DIR.parent
WEB_DIR = APP_DIR
DATA_DIR = BASE_DIR / "data"
CONFIG_FILE = DATA_DIR / "client.json"
@@ -119,12 +120,12 @@ class ProxyControlHandler(http.server.BaseHTTPRequestHandler):
return
# Run gen-client-from-url.sh
script_path = APP_DIR / "gen-client-from-url.sh"
script_path = BASE_DIR / "gen-client-from-url.sh"
result = subprocess.run(
[str(script_path), url, str(CONFIG_FILE)],
capture_output=True,
text=True,
cwd=str(APP_DIR),
cwd=str(BASE_DIR),
timeout=30
)