Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

Classify the Cloud tunnel route and threads

Juan Denis73a53b869225
diff --git a/backend/app/jobs/thread_ownership.py b/backend/app/jobs/thread_ownership.py
index ab46f697..fb1f1b30 100644
--- a/backend/app/jobs/thread_ownership.py
+++ b/backend/app/jobs/thread_ownership.py
@@ -178,6 +178,23 @@ THREAD_OWNERSHIP = {
'restart loses an attempt rather than the record of it.'
),
},
+ 'app/services/connect_tunnel.py:start:self._run': {
+ 'owner': 'connect tunnel Socket.IO stream',
+ 'lifecycle': LIFECYCLE_REQUEST_STREAM,
+ 'rationale': (
+ 'Bridges one browser Socket.IO socket from the relay to the '
+ 'loopback listener; it ends when either side closes or the relay '
+ 'connection drops (Tunnel.shutdown).'
+ ),
+ },
+ 'app/services/connect_tunnel.py:_run:self._pump_in': {
+ 'owner': 'connect tunnel Socket.IO stream',
+ 'lifecycle': LIFECYCLE_REQUEST_STREAM,
+ 'rationale': (
+ 'The browser-to-panel half of the same bridged socket; stop() '
+ 'wakes it with a sentinel so it exits with the stream.'
+ ),
+ },
}
diff --git a/backend/tests/test_route_authz_static.py b/backend/tests/test_route_authz_static.py
index 9a7c7c6e..a3b7898a 100644
--- a/backend/tests/test_route_authz_static.py
+++ b/backend/tests/test_route_authz_static.py
@@ -147,6 +147,7 @@ PUBLIC_ALT_AUTH = {
'agent_poll.disconnect': 'X-Session-Token lookup',
'agent_poll.poll': 'X-Session-Token resolves the ConnectedAgent',
'agent_poll.result': 'X-Session-Token resolves the ConnectedAgent',
+ 'auth.connect_session': 'loopback-only + Cloud grant verified against JWKS, 30/min',
'auth.login': 'password credential + per-IP/per-user throttles + lockout',
'auth.passkey_authenticate': 'WebAuthn assertion verification, 5/min',
'auth.redeem_login_link': 'single-use login-link token + per-IP throttle',