1. DoT(DNS over TLS)
1 2 |
apt install knot-dnsutils kdig example.com @8.8.8.8 +tls |
2. DoH (DNS over HTTPS)
2.1 JSON format, path: /resolve
1 2 |
curl 'https://223.5.5.5/resolve?name=example.com&type=A' curl 'https://8.8.8.8/resolve?name=example.com&type=A' |
2.2 JSON format, path: /dns-query
1 2 |
curl 'https://223.5.5.5/dns-query?name=example.com&type=A' curl 'https://1.1.1.1/dns-query?name=example.com&type=A' -H 'accept: application/dns-json' |
2.3 UDP wireformat, path: /dns-query (RFC 8484)
1 2 3 |
curl 'https://223.5.5.5/dns-query?dns=q80BAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB' curl 'https://8.8.8.8/dns-query?dns=q80BAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB' curl 'https://1.1.1.1/dns-query?dns=q80BAAABAAAAAAAAA3d3dwdleGFtcGxlA2NvbQAAAQAB' -H 'accept: application/dns-message' |
3. Others
3.1 curl DoH
1 |
curl --doh-url https://8.8.8.8/dns-query http://example.com |