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.

MessageDirectionDescription
<token>Agent → ServerAuthentication token (sent on connect)
REGISTER <port> [<token> UDP]Agent → ServerRequest a TCP or UDP public port
CONNECT <uuid>Server → AgentNotify agent of an incoming public connection

Data channel messages

Sent over per-connection TCP connections to port 9001.

MessageDirectionDescription
DATA <uuid>Agent → ServerIdentify data connection (first message only)

After the identification message, TCP connections become raw pipes. UDP payloads are transported as length-prefixed frames over the TCP data connection and are sent to the local UDP service as datagrams.

Default ports

text
Control channel:    9000
Data channel:       9001
Default public:     25565
Fallback range:     20000-30000