Datagram tunnels in rstream netcat


rstream nc now carries packet-oriented workloads through private datagram tunnels, using standard input and output, an executed process, or a local UDP socket on either side.

Datagram mode is enabled with -u. On standard input and output, each packet uses RFC 4571 framing so packet boundaries survive a pipe. The UDP bridge accepts udp:// endpoints and maps one local UDP packet to one tunnel datagram, which lets existing media tools and network services use rstream without learning its tunnel protocol.

Delivery policy is independent from the transport used to reach the engine. With QUIC tunnel transport, the default path can carry packets as QUIC datagrams on both the tunnel owner and private dialer legs. This avoids ordered-stream overhead for real-time traffic, but QUIC datagrams are not retransmitted. TLS transport preserves packet boundaries with framing and remains available through automatic transport fallback.

Applications that cannot tolerate packet loss can set --datagram-guaranteed-delivery when creating the tunnel. The engine then keeps datagram boundaries but uses a reliable path, including when the client control channel itself runs over QUIC. Leaving the option unset does not promise loss or reliability; it allows the selected transport to use the most appropriate packet path.

The CLI datagram runtime is available in rstream CLI and Go SDK 1.24.0.

See Private Tunnels for netcat framing, UDP bridge forms, lifecycle, and delivery semantics. Stream Video with GStreamer and rstream provides an end-to-end RTP example over the datagram path.