Skip to main content

remote-gateway

Session handshake, input/clipboard relay, file-transfer permission, and audit for remote desktop. Never carries the screen, the machine's sound, or a byte of a file — see Remote Desktop.

/ws/remote​

Session state, input events (mouse/keyboard), clipboard events, file offers, and the offer/answer/ICE exchange for the session's WebRTC connection.

EventDirectionPermission
input.mouse, input.keycontroller → agentREMOTE_CONTROL
clipboard.setcontroller → agentREMOTE_CLIPBOARD
clipboard.textagent → controllerREMOTE_CLIPBOARD
file.offercontroller → agentREMOTE_FILE_TRANSFER, audited as file.offered
file.cancelcontroller → agentnone — giving up is always allowed
file.accepted, file.refusedagent → controllerthe machine's answer
file.doneagent → controlleraudited as file.received
control.request, control.releasecontroller → agentnone; the machine answers
screen.selectcontroller → agentnone — a view-only session may look at the other monitor
rtc.signalbothnone; relayed unread

file.offer is the only message a transfer sends through here. The bytes go down the session's data channel, directly between the two machines. That split is what makes the permission enforceable at all: the gateway checks the thing that asks, and the bulk that follows is meaningless without it.

Every refusal is written to RemoteAudit, not only rejected — a client that keeps asking for something it was not granted is worth being able to see afterwards.

/api/v1/remote​

MethodPathWhat it does
GET/machinesList machines the caller owns or has a grant on
POST/machinesEnroll a machine, returns the one-time agent token
PATCH/machines/:machineIdRename / update a machine
DELETE/machines/:machineIdRemove a machine
GET/machines/:machineId/grantsList permission grants
PUT/machines/:machineId/grantsSet a grant (permissions, optional expiry)
GET/machines/:machineId/auditRead RemoteAudit for a machine
POST/sessionsRequest a session (may raise a consent prompt on the target)
DELETE/sessions/:sessionIdEnd a session; the body carries what the controller counted
GET/usage?days=This account's own remote sessions over a window, and what they moved

DELETE /sessions/:sessionId takes an optional RemoteSessionUsage (bytesSent, bytesReceived, transport). It is the client's own count and nothing here can check it, so it is clamped rather than trusted, and only the controller's figures are taken — an administrator ending somebody else's session reports nothing. GET /usage is the remote half of the Calls & Data page: a call and a remote session are the same shape of thing, and only one of them used to be counted.

A machine somebody has no access to answers 404 rather than 403, so machine ids aren't probeable. See Remote Desktop for the permission model and session-freezing rule.