How WireGuard actually works
WireGuard is under 4,000 lines of code and negotiates nothing. The part most write-ups leave out is that every server running it must keep a table mapping public keys to internal addresses — so here is how the protocol works, and exactly what that table holds for us.