Awesome
Multi-DoH Server
Warning: This code is highly experimental and I don't recommend running it in production.
The SkyDroid App uses this server to efficiently query a lot of domain names at once in a single request.
It is part of my submission to the ‘Own The Internet’ Hackathon
This server requires a HSD Node running locally with ./bin/hsd --rs-port 53
Enabling Unbound support is recommended.
This server listens on port 8053 and accepts HTTP connections. HTTPS can be enabled using a reverse proxy like Nginx.
Limitations
- Only TXT Records are supported
- The server currently uses the
dig
command-line tool to run queries against the local resolver and parses thestdout
. :D
Example
POST
to /multi-dns-query
{
"type": 16,
"names": [
"example.com",
"redsolver",
"papagei"
]
}
Response
{
"type": 16,
"names": {
"example.com": [],
"redsolver": [
"TXT Record 1",
"TXT Record 2"
],
"papagei": [
"something something"
]
}
}
How to deploy (if you really want to)
- Get the Dart SDK
dart2native bin/multi_doh_server.dart
to produce a binary- Something like
scp bin/multi_doh_server.exe root@YOUR_SERVER_IP:/root/multi_doh_server/multi_doh_server.exe
to copy the binary to your server - Run the binary