Skip to content

tailcat: add application-layer UDP support - #25

Open
sksingh2005 wants to merge 1 commit into
tailscale:mainfrom
sksingh2005:application-layer-udp
Open

tailcat: add application-layer UDP support#25
sksingh2005 wants to merge 1 commit into
tailscale:mainfrom
sksingh2005:application-layer-udp

Conversation

@sksingh2005

Copy link
Copy Markdown

Related Issue: #23

Summary

Adds generic application-layer UDP support to Tailcat using connected packet connections.
Applications can now exchange UDP datagrams with a server or forward them through a Tailcat exit node while reusing the existing WireGuard, direct-path discovery, and DERP fallback data plane.

Fix

Introduces client-side DialUDPPort and DialUDP APIs and server-side OnUDP and OnUDPForward handlers. UDP flows preserve datagram boundaries and expose their source and destination endpoints through ConnPacketConn.

The server packet filter now supports UDP served-port restrictions and UDP exit-node traffic. IPv4 forwarding uses the existing NAT64 mapping, and ProxyPacketConns provides datagram-safe bidirectional forwarding. The API documentation also defines the 1232-byte safe UDP payload limit for Tailcat’s IPv6 tunnel MTU.

Test

Added integration tests using the existing local DERP and STUN environment.
Coverage includes datagram echoing, endpoint preservation, two simultaneous clients with independent source ports, served-port filtering, maximum safe payload delivery, and IPv4 UDP forwarding through the server.
The full Go test suite, race-enabled UDP tests, go vet, native and WASM builds, and headless-browser tests pass.

Add client and server UDP APIs, filtering, NAT64 forwarding, tests, and
documentation.

Signed-off-by: Shashank Singh <shashanksgh3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant