diff --git a/vps/owrt-remote-hub.py b/vps/owrt-remote-hub.py index f01ed21..a4800f0 100644 --- a/vps/owrt-remote-hub.py +++ b/vps/owrt-remote-hub.py @@ -61,6 +61,7 @@ CAPTCHA_TTL_SECONDS = 600 NOTIFICATIONS_MAX = 220 LUCI_ABSOLUTE_ROOTS = ("/ubus", "/cgi-bin/luci", "/luci-static") WS_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" +VPS_TERMINAL_ID = "__vps__" SSH_HTTP_SESSIONS = {} SSH_HTTP_LOCK = threading.Lock() ROUTER_PROXY_LOCK = threading.Lock() @@ -1511,6 +1512,14 @@ def current_router_cookie(router_id): return f"{ROUTER_COOKIE}={urllib.parse.quote(router_id)}; HttpOnly; SameSite=Lax; Path=/" +def is_vps_terminal_id(router_id): + return router_id == VPS_TERMINAL_ID + + +def vps_terminal_row(): + return {"id": VPS_TERMINAL_ID, "name": "VPS"} + + def ssh_ws_token(secret, router_id): return hmac.new( secret.encode("utf-8"), @@ -1666,6 +1675,7 @@ input,select{{min-width:0;border:1px solid var(--line);border-radius:8px;padding