Go at Tailscale
summary
Go runs the server and five clients (Linux, Windows, macOS, iOS, Android) with most code shared in one repository; Windows uses a tiny system-tray layer via lxn/walk, macOS links Go into a Swift app via c-archive, and Android uses a JNI bridge with Gio. Networking uses WireGuard plus a magic-sock layer that does NAT punching and falls back to DERP relays (cheap global VMs) until clients switch to direct paths in about one second. A custom netip value type (uint128 + unsafe interning + finalizers) replaces net.IP to be immutable, comparable, and allocation-free.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 3:05What is Tailscale
- 9:00Mac OS
- 11:26iOS
- 14:13Server
- 15:46NAT Traversal
- 18:45NETIP
- 21:06IP Address Type
- 22:36API
related talks
57mHacking with Go
37mGio Cross Platform GUI Programming for Mobile, Desktop, WebAssembly
11mRethinking Remote Access in a Remote First World
14mBeyond Traditional VPNs: WireGuard Mesh Networking for Kubernetes with Tailscale
26mWrite Once, Compile Lots, Run Anywhere
23mAn Operating System in Go
30mHigh Performance Systems in Go
20m"Go(lang) for mobile"
