Documentation menu
Documentation
Protocol
Protocol & data plane
The wire protocol is split into a small HTTP/WebSocket control plane and a streaming data plane. proto/sync.proto mirrors the JSON shapes.
Control plane endpoints
| Endpoint | Purpose |
|---|---|
GET /api/v1/records | List records with kind, limit and before. |
POST /api/v1/records/text | Store a text record and broadcast it. |
POST /api/v1/records/blob | Stream an image or file body with kind, name, mime and optional X-Blake3. |
GET /api/v1/blobs/{id} | Download a blob, with HTTP Range support. |
GET /api/v1/blobs/{id}/thumb | Image preview: server-rendered JPEG, w=64..1024 (default 320), cached on disk. |
DELETE /api/v1/records/{id} | Delete your own record and blob. |
GET /api/v1/relay/{session_id} | Relay byte stream using X-Session-Ticket; the connection is hijacked and forwarded both ways. |
P2P session
- The control plane issues a single-use
32-byteticket and a candidate pool to both peers. - Both sides complete mutual TLS with their system certificates.
- The receiver races LAN and VPN candidates in
300 mssteps. - A direct link streams fixed
49-byteframes. - If nothing answers by
1.2 s, the server relays the same session withio.Copy; the pairing timeout is15 s.
Note
The relay is transparent byte forwarding. End-to-end protection stays between the two clients, and the server does not write the stream to disk.
Blobs and records
POST /api/v1/records/blobstreams the body instead of buffering it in memory.GET /api/v1/blobs/{id}supports Range resume on both clients.- Text is capped at
64 KiBand stored in SQLite. - Delete is owner-only; there is no admin override.
Frames
Data-plane frames are fixed 49 bytes; Android also carries BLAKE3 framing. The relay reuses the same frame stream, so a client cannot tell from the payload whether the bytes arrived directly or through the server.
Reference: proto/sync.proto.