fix: multi-node online stats, per-node Hy2 ports, and panel reload stability

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-16 11:35:15 +08:00
parent 33533d7ebc
commit abbaac9520
11 changed files with 246 additions and 73 deletions
+2 -4
View File
@@ -6,7 +6,7 @@ import hmac
import os
import secrets
import sqlite3
import subprocess
import uuid
from pathlib import Path
ROOT = Path(os.environ.get("JIEDIAN_ROOT", Path(__file__).resolve().parents[1]))
@@ -156,6 +156,4 @@ def node_count() -> int:
def _generate_credentials() -> tuple[str, str]:
uuid = subprocess.check_output(["sing-box", "generate", "uuid"], text=True).strip()
hy2 = secrets.token_urlsafe(18)[:24]
return uuid, hy2
return str(uuid.uuid4()), secrets.token_urlsafe(18)[:24]