Nice. This does some things very similarly to Hyprspace[1]. The core idea is the same: Receive some bytes from a TUN device, shove them into a network socket, and vice versa. Hyprspace uses libp2p to manage the outer connections between VPN nodes instead of plain UDP, which takes care of addressing, hole punching and encryption.<p>BTW: You can also use the netlink library to configure the routing table without external processes[2]. The /1 trick isn't necessary either, you can just create a route for 0.0.0.0/0 and set its metric lower than the existing default route. That won't replace the old route in the table, the new one will just take precedence as long as it exists.<p>[1] <a href="https://github.com/hyprspace/hyprspace">https://github.com/hyprspace/hyprspace</a><p>[2] <a href="https://github.com/hyprspace/hyprspace/blob/a5957e485ff0c2e9133e7da5408ec1273681688e/tun/tun_linux.go#L73-L77">https://github.com/hyprspace/hyprspace/blob/a5957e485ff0c2e9...</a>