Protocol Reference
Complete reference for the Exposr protocol.
Overview
Exposr uses a simple text-based protocol. Messages are sent as UTF-8 text, one per line, terminated by a newline character.
Control channel messages
Sent over the persistent connection to port 9000.
| Message | Direction | Description |
|---|---|---|
| <token> | Agent → Server | Authentication token (sent on connect) |
| REGISTER <port> | Agent → Server | Request a public port for the tunnel |
| CONNECT <uuid> | Server → Agent | Notify agent of an incoming public connection |
Data channel messages
Sent over per-connection TCP connections to port 9001.
| Message | Direction | Description |
|---|---|---|
| DATA <uuid> | Agent → Server | Identify data connection (first message only) |
After the identification message, the connection becomes a raw TCP pipe. All subsequent bytes are forwarded directly between the public client and the local service.
Default ports
text
Control channel: 9000
Data channel: 9001
Default public: 25565
Fallback range: 20000-30000