TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Unbound – a validating, recursive, caching DNS resolver

3 pointsby bjokoalmost 6 years ago

1 comment

3xblahalmost 6 years ago
Unbound is of course just one of the many programs using ldns. nsd, drill are also useful. More recently, stubby.1<p>1 <a href="https:&#x2F;&#x2F;getdnsapi.net&#x2F;blog&#x2F;dns-privacy-daemon-stubby&#x2F;" rel="nofollow">https:&#x2F;&#x2F;getdnsapi.net&#x2F;blog&#x2F;dns-privacy-daemon-stubby&#x2F;</a><p>Here is how to use drill to do DOH via POST, using Cloudflare DNS as an example.<p><pre><code> test $# = 1|| exec echo usage: $0 query # requirements: sed, wc, xxd, openssl, ldns, drill # reference: https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc8484#section-4.1 a=$(drill -q &#x2F;dev&#x2F;stdout $1 |sed &#x27;1,2d;s&#x2F;;.*&#x2F;&#x2F;;s&#x2F; &#x2F;&#x2F;g&#x27;|xxd -p -r|wc -m);</code></pre> (printf &quot;POST &#x2F;dns-query HTTP&#x2F;1.1\r\nHost: cloudflare-dns.com\r\nAccept: <i>&#x2F;</i>\r\nContent-Type: application&#x2F;dns-message\r\nConnection: close\r\nContent-Length: $a\r\n\r\n&quot;; drill -q &#x2F;dev&#x2F;stdout $1|sed &#x27;1,2d;s&#x2F;;.*&#x2F;&#x2F;;s&#x2F; &#x2F;&#x2F;g;3s&#x2F;....&#x2F;0001&#x2F;&#x27;|xxd -p -r)|openssl s_client -no_tls1 -no_tls1_1 -no_ssl2 -no_ssl3 -ign_eof -no_ticket -host cloudflare-dns.com -port 443 -servername 1.1.1.1|sed -n \$p|xxd -p|drill -i &#x2F;dev&#x2F;stdin|sed &#x27;&#x2F;^;; Data: \\#&#x2F;d&#x27;