https://github.com/Opensourcecommunitydevelopment/dns-over-http2
https://github.com/yyfrankyy/dns-over-http2
Inspired by gdns-go, but do less, I'd like to keep it as simple as possible.
So,
- No cache. use it as a backend, dnsmasq or unbound as frontend.
- No proxy. setup your proxy globally, the script will simply honor it.
- Less config. if your public ip is changed, restart the script.
Last but not least, long live process, I prefer pm2.
Write a process file
with your customized setup (say dns-over-http2.json
):
{
"apps" : [{
"name" : "dns-over-http2",
"script" : "/path/to/your/dns-over-http2/index.js",
"args" : ["your public ip", 6666, "127.0.0.1"],
"env": {
"NODE_ENV": "production"
}
}]
}
Simply start it as follow:
pm2 start dns-over-http2.json
All set, test it with dig:
$ dig @127.0.0.1 -p 6666 github.com A +short
github.com.
192.30.253.112