Repository navigation
Protocol
mrrizkin edited this page Oct 31, 2026
·
2 revisions
QUIC on UDP 53320, discovery on UDP 53321, ALPN quicdrop/1.
One connection per transfer, with length-prefixed postcard frames:
| Frame | Direction | Purpose |
|---|---|---|
Hello |
sender → receiver → sender | version, device id, name, platform |
Offer |
sender → receiver | session id, FileMeta{id,name,size,hash?}
|
Accept / Reject
|
receiver → sender | per-file resume offset, or reason |
Complete |
receiver → sender | bytes written |
Error / Bye
|
either | terminal |
Each file is cut into 8 MiB chunks. A pool of up to 4 workers sends each chunk over its own bidirectional stream:
FileHeader{session,id,offset,size,index,count}- payload
FileTrailer{id,hash}FileAck{ok,hash,message}
A chunk is acked as soon as it is written; the last ack settles the whole-file digest.
mDNS and a UDP beacon run in parallel. Both stay on the local link, so tailnet peers are addressed directly by hostname or IP instead.
One stream per file removes the request queue and TCP head-of-line blocking that per-file HTTP transfers pay. A lost packet stalls one file, not the session. Byte offsets make resume free, and connection migration survives a Wi-Fi to hotspot switch.
quicdrop · MIT