← All tagsTag
Networking
Configuring the tunnel and getting the MTU right
Letting the VPN configure its own TUN device, validating the tunnel address, and working out an MTU that leaves room for the tunnel's own headers.
Forwarding packets in both directions
Connecting the TUN device to the UDP transport, and making sure the program shuts down cleanly when it's stopped.
Reading packets from a TUN device
Creating a TUN device in Go, a minimal UDP transport, and a two-machine test lab built from Linux network namespaces.
Building a VPN in Go: the plan
Why I'm writing a point-to-point VPN from scratch in Go, what it will and won't do, and how I'm going to build it.