The UDX protocol
UDX is a QUIC-inspired transport that runs over plain UDP. It gives you reliable, ordered, multiplexed streams with congestion and flow control, and it survives the network changes that break TCP on mobile devices.
It is the default transport under both dart-libp2p and the Ricochet server,
where it is addressed as /ip4/<addr>/udp/<port>/udx. Transports for
go-libp2p and js-libp2p use the same address, so Dart, Go and Node.js
nodes connect to each other over it.
What it provides
Section titled “What it provides”| Feature | What it means for you |
|---|---|
| Stream multiplexing | Many independent streams share one UDP connection. Since v3, a lost packet on one stream no longer stalls the others. |
| CUBIC congestion control | RFC 9002-style RTT estimation, packet pacing and delayed ACKs |
| Flow control | Limits at both the connection and the stream level, so a slow reader throttles its sender |
| Connection migration | PATH_CHALLENGE / PATH_RESPONSE, so a phone moving from Wi-Fi to cellular keeps its connection |
| Path MTU discovery | RFC 8899 binary search between 1280 and 1500 bytes |
| Anti-amplification | A 3× limit on data sent to unvalidated addresses |
Implementations
Section titled “Implementations”dart_udxThe Dart implementation, on pub.dev. Used by dart-libp2p's UDXTransport.
go-udxThe Go implementation, with batched recvmmsg/sendmmsg on Linux.
js-udxThe TypeScript implementation for Node.js, with a js-libp2p transport.
go-libp2p-udx-transportPlugs go-udx into go-libp2p as a transport, with Noise and Yamux over a UDX stream, so Go peers dial Dart peers over /udx.