Skip to content

Opensourcecommunitydevelopment/h2dns

 
 

Repository files navigation

DNS Over HTTP/2

IPv6 Forced Version for Dual-Stack Hosts.

Inspired by v6dns, but integrated.

For original version see:

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,

  1. No cache. use it as a backend, dnsmasq or unbound as frontend.
  2. No proxy. setup your proxy globally, the script will simply honor it.
  3. 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

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.5%
  • Other 0.5%