Vendored from CottenDNS (WhiteDNS fork of StormDNS and MasterDnsVPN), MIT (LICENSE-CottenDNS).
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:`).
