cloudflared-mirror/quic
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
..
v3 TUN-9882: Add buffers for UDP and ICMP datagrams in datagram v3 2025-10-07 16:14:01 -07:00
constants.go TUN-8415: Refactor capnp rpc into a single module 2024-05-17 11:22:07 -07:00
conversion.go TUN-8243: Collect metrics on the number of QUIC frames sent/received 2024-02-19 10:09:14 +00:00
datagram.go TUN-8006: Update quic-go to latest upstream 2023-12-04 17:09:40 +00:00
datagram_test.go TUN-8006: Update quic-go to latest upstream 2023-12-04 17:09:40 +00:00
datagramv2.go TUN-8006: Update quic-go to latest upstream 2023-12-04 17:09:40 +00:00
metrics.go TUN-9322: Add metric for unsupported RPC commands for datagram v3 2025-05-13 16:11:09 +00:00
param_unix.go TUN-5623: Configure quic max datagram frame size to 1350 bytes for none Windows platforms 2022-01-11 14:55:43 +00:00
param_windows.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
safe_stream.go TUN-8297: Improve write timeout logging on safe_stream.go 2024-03-13 13:30:45 +00:00
safe_stream_test.go TUN-8415: Refactor capnp rpc into a single module 2024-05-17 11:22:07 -07:00
tracing.go TUN-8456: Update quic-go to 0.45 and collect mtu and congestion control metrics 2024-06-17 15:28:56 +00:00