author | Alberto Bertogli
<albertito@blitiri.com.ar> 2020-05-28 00:08:17 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2020-05-29 00:38:39 UTC |
parent | cdded2209e09a57e53e63736664a980495a012c1 |
README.md | +4 | -4 |
dnss.go | +8 | -8 |
internal/dnsjson/dnsjson.go | +1 | -1 |
internal/httpresolver/resolver.go | +1 | -1 |
tests/external.sh | +4 | -4 |
diff --git a/README.md b/README.md index 6f9210c..50ad5f7 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ want end to end control). ## Features * Supports the JSON-based protocol as implemented by - [dns.google.com](https://dns.google.com) + [dns.google](https://dns.google) ([reference](https://developers.google.com/speed/public-dns/docs/dns-over-https)). * Supports the [DNS Queries over HTTPS (DoH)](https://tools.ietf.org/html/draft-ietf-doh-dns-over-https) proposed @@ -68,14 +68,14 @@ sudo systemctl dnss enable Listens on port 53 for DNS queries, resolves them using the given HTTPS URL. ```shell -# Use the default HTTPS URL (currently, dns.google.com): +# Use the default HTTPS URL (currently, dns.google): dnss -enable_dns_to_https # Use Cloudflare's 1.1.1.1: dnss -enable_dns_to_https -https_upstream="https://1.1.1.1/dns-query" -# Use Google's dns.google.com: -dnss -enable_dns_to_https -https_upstream="https://dns.google.com/resolve" +# Use Google's dns.google: +dnss -enable_dns_to_https -https_upstream="https://dns.google/dns-query" ``` ### HTTPS server diff --git a/dnss.go b/dnss.go index 53f61dc..019a78f 100644 --- a/dnss.go +++ b/dnss.go @@ -1,12 +1,12 @@ // dnss is a tool for encapsulating DNS over HTTPS. // -// It can act as a DNS-to-HTTPS proxy, using dns.google.com as a server, or -// anything implementing the same API. +// It can act as a DNS-to-HTTPS proxy, exposing a traditional DNS server and +// resolving queries using any DNS-over-HTTP (DoH) server. // -// It can also act as an HTTPS-to-DNS proxy, so you can use it instead of -// dns.google.com if you want more control over the servers and the final DNS -// server used (for example if you are in an isolated environment, such as a -// test lab or a private network). +// It can also act as an HTTPS-to-DNS proxy, so you can use it as a DoH server +// if you want more control over the servers and the final DNS server used +// (for example if you are in an isolated environment, such as a test lab or a +// private network). // // See the README.md file for more details. package main @@ -39,14 +39,14 @@ var ( fallbackUpstream = flag.String("fallback_upstream", "8.8.8.8:53", "DNS server to resolve domains in --fallback_domains") - fallbackDomains = flag.String("fallback_domains", "dns.google.com.", + fallbackDomains = flag.String("fallback_domains", "dns.google.", "Domains we resolve via DNS, using --fallback_upstream"+ " (space-separated list)") enableDNStoHTTPS = flag.Bool("enable_dns_to_https", false, "enable DNS-to-HTTPS proxy") httpsUpstream = flag.String("https_upstream", - "https://dns.google.com/resolve", + "https://dns.google/dns-query", "URL of upstream DNS-to-HTTP server") httpsClientCAFile = flag.String("https_client_cafile", "", "CA file to use for the HTTPS client") diff --git a/internal/dnsjson/dnsjson.go b/internal/dnsjson/dnsjson.go index a6a0bc3..4b88e9d 100644 --- a/internal/dnsjson/dnsjson.go +++ b/internal/dnsjson/dnsjson.go @@ -1,6 +1,6 @@ // Package dnsjson contains structures for representing DNS responses as JSON. // -// Matches the API implemented by https://dns.google.com/. +// Matches the API implemented by https://dns.google/. package dnsjson // Response is the highest level struct in the DNS JSON response. diff --git a/internal/httpresolver/resolver.go b/internal/httpresolver/resolver.go index ac94878..3019e03 100644 --- a/internal/httpresolver/resolver.go +++ b/internal/httpresolver/resolver.go @@ -24,7 +24,7 @@ import ( // httpsResolver implements the dnsserver.Resolver interface by querying a // server via DNS over HTTPS. // -// It supports two modes: JSON (like https://dns.google.com) and DoH +// It supports two modes: JSON (like https://dns.google) and DoH // (https://tools.ietf.org/html/draft-ietf-doh-dns-over-https-12). type httpsResolver struct { Upstream *url.URL diff --git a/tests/external.sh b/tests/external.sh index 27c615a..ffdbe66 100755 --- a/tests/external.sh +++ b/tests/external.sh @@ -165,17 +165,17 @@ kill $PID kill $HTTP_PID -echo "## Autodetect against dns.google.com" +echo "## Autodetect against dns.google/resolve (JSON)" dnss -enable_dns_to_https -dns_listen_addr "localhost:1053" \ - -https_upstream "https://dns.google.com/resolve" + -https_upstream "https://dns.google/resolve" resolve kill $PID -echo "## JSON against dns.google.com" +echo "## JSON against dns.google/resolve" dnss -enable_dns_to_https -dns_listen_addr "localhost:1053" \ -force_mode="JSON" \ - -https_upstream "https://dns.google.com/resolve" + -https_upstream "https://dns.google/resolve" resolve kill $PID