Vendored from MasterDnsVPN, Copyright (c) 2026 Amin Mahmoudi, MIT (LICENSE-MasterDnsVPN).
Changes: the server side, tests and command-line programs are left out; import paths follow the engine's
module; the places that open the tunnel's own sockets go through sanghook (lines marked `// sang:`).
