cloudflared-mirror/quic/v3
Devin Carr 1fb466941a TUN-9882: Add buffers for UDP and ICMP datagrams in datagram v3
Instead of creating a go routine to process each incoming datagram from the tunnel, a single consumer (the demuxer) will
process each of the datagrams in serial.

Registration datagrams will still be spun out into separate go routines since they are responsible for managing the
lifetime of the session once started via the `Serve` method.

UDP payload datagrams will be handled in separate channels to allow for parallel writing inside of the scope of a
session via a new write loop. This channel will have a small buffer to help unblock the demuxer from dequeueing other
datagrams.

ICMP datagrams will be funneled into a single channel across all possible origins with a single consumer to write to
their respective destinations.

Each of these changes is to prevent datagram reordering from occurring when dequeuing from the tunnel connection. By
establishing a single demuxer that serializes the writes per session, each session will be able to write sequentially,
but in parallel to their respective origins.

Closes TUN-9882
2025-10-07 16:14:01 -07:00
..
datagram.go TUN-8861: Rename Session Limiter to Flow Limiter 2025-01-20 06:33:40 -08:00
datagram_errors.go TUN-8640: Add ICMP support for datagram V3 2024-12-09 07:23:11 -08:00
datagram_test.go TUN-9882: Add buffers for UDP and ICMP datagrams in datagram v3 2025-10-07 16:14:01 -07:00
icmp.go TUN-8640: Add ICMP support for datagram V3 2024-12-09 07:23:11 -08:00
icmp_test.go TUN-8640: Add ICMP support for datagram V3 2024-12-09 07:23:11 -08:00
manager.go TUN-9470: Add OriginDialerService to include TCP 2025-06-30 13:24:16 -07:00
manager_test.go TUN-9470: Add OriginDialerService to include TCP 2025-06-30 13:24:16 -07:00
metrics.go TUN-9319: Add dynamic loading of features to connections via ConnectionOptionsSnapshot 2025-05-14 20:11:05 +00:00
metrics_test.go TUN-9322: Add metric for unsupported RPC commands for datagram v3 2025-05-13 16:11:09 +00:00
muxer.go TUN-9882: Add buffers for UDP and ICMP datagrams in datagram v3 2025-10-07 16:14:01 -07:00
muxer_test.go TUN-9882: Add buffers for UDP and ICMP datagrams in datagram v3 2025-10-07 16:14:01 -07:00
request.go TUN-8641: Expose methods to simplify V3 Datagram parsing on the edge 2024-11-04 15:23:36 -08:00
request_test.go TUN-8641: Expose methods to simplify V3 Datagram parsing on the edge 2024-11-04 15:23:36 -08:00
session.go TUN-9882: Add buffers for UDP and ICMP datagrams in datagram v3 2025-10-07 16:14:01 -07:00
session_fuzz_test.go TUN-9882: Add buffers for UDP and ICMP datagrams in datagram v3 2025-10-07 16:14:01 -07:00
session_test.go TUN-9882: Add buffers for UDP and ICMP datagrams in datagram v3 2025-10-07 16:14:01 -07:00