-
Notifications
You must be signed in to change notification settings - Fork 0
Remote Namespace
The /remote socket.io namespace provides one-time-ticket binary
streaming sessions — built for remote-control use cases: an agent
streams binary frames (e.g. screen captures) to viewers, and viewers send
input events back to the agent.
-
An authenticated client on the main namespace requests a ticket:
client → server: REMOTE_TICKET_REQUEST { session_id?, machine_id?, role: 'agent'|'viewer' } server → client: REMOTE_TICKET { ok, session_id, ticket, role, expires_in }With auth enabled, the socket must authenticate first; the ticket inherits the socket's realm. Tickets are single-purpose, random, and expire after 60 s by default (
remote: { ticket_ttl_ms }). -
The remote party connects to
/remoteand presents the ticket:socket → server: auth { ticket, session_id } server → socket: auth_ok { session_id, role } | auth_error { message } // invalid/expired/mismatchedThe ticket must match the session and the role it was issued for.
-
Streaming:
Event Direction Payload frameagent → all viewers binary (Buffer/ArrayBuffer) frame data input.mouseviewer → agent mouse event object input.keyboardviewer → agent keyboard event object One agent per session, any number of viewers; frames fan out to the session's viewer room only.
Server-side:
server.remote.getSession(sessionId); // { session_id, agent_connected, viewer_count }
server.remote.listSessions();
server.remote.issueTicket({ session_id, realm, machine_id, role });- Tickets are the only way into
/remote— there is no password fallback. - Issuing a ticket requires an (authenticated, when auth is on) main- namespace connection, so realm/role policy gates who can start sessions.
- Expired or reused-for-the-wrong-session tickets are rejected with
auth_error.
tyo-mq · README · Improvement Plan · Clustering Guide · Apache-2.0
Basics
Security
- Authentication and Realms
- Ephemeral Realms
- Roles and Connection Authorization
- Authorization Requests
Delivery
Routing
Operations
Reference