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:
+2
-4
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user