Protocol

The Exposr control and data channel protocol.

Control protocol

The control protocol operates over the persistent TCP connection on port 9000. Messages are text-based, one per line.

text
# Agent authenticates with token (sent on connection)
<agent-token>

# Agent registers a public port
REGISTER <port>

# Server notifies agent of a new public connection
CONNECT <connection-uuid>

Data protocol

The data protocol operates on port 9001. Each data connection begins with an identification message, after which the connection becomes a raw TCP pipe.

text
# Agent identifies the data connection
DATA <connection-uuid>

# After identification, raw TCP data flows bidirectionally

Message reference

MessageDirectionChannelDescription
REGISTER <port>Agent → ServerControlRequest a public port
CONNECT <uuid>Server → AgentControlNotify of incoming connection
DATA <uuid>Agent → ServerDataIdentify a data connection