How EdgeVPN Builds a Serverless VPN Using Go and a Kernel Trick

A developer named Maneshwar published a deep-dive explaining how VPNs work by analyzing EdgeVPN, a serverless VPN written in Go. At the core of every VPN is a TUN device — a virtual network interface that lets a program intercept and inject IP packets directly through the Linux kernel. Unlike traditional VPNs that rely on a central server, EdgeVPN allows two machines to find each other across the internet using just a shared token, with no control plane required. The post traces the full packet journey from the TUN file descriptor read loop through peer discovery and routing in a decentralized setup. Maneshwar wrote the article alongside promoting git-lrc, his open-source AI code review tool that runs on every Git commit.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in