☁️ DoH 解析代理

Cloudflare Worker anycast 边缘 · 上游 1.1.1.1 / 8.8.8.8 · 自动缓存 · (开放使用,建议加 ACCESS_TOKEN 或 Cloudflare Access 保护)

1. 快速测试

curl --doh-url https://dns.corepot.com/dns-query https://example.com/
curl "dns.corepot.com/resolve?name=example.com&type=A"

注:部分 BIND 版 dig +https 不发 SNI,连自定义域名会报 TLS error(官方 1.1.1.1 不受影响);请用 curl --doh-url / kdig / 浏览器。

2. JSON API

curl "dns.corepot.com/resolve?name=example.com&type=A"

3. 程序(浏览器/JS)

const r = await fetch("https://dns.corepot.com/resolve?name=example.com&type=A");
console.log(await r.json());

4. wire format(RFC 8484)

# POST
curl -H 'content-type: application/dns-message' -H 'accept: application/dns-message' \
     --data-binary @query.bin https://dns.corepot.com/dns-query
# GET(base64url)
curl "https://dns.corepot.com/dns-query?dns=AAABAAABAAAAAAAAB2V4YW1wbGUDY29tAAABAAE"

5. 健康检查

curl dns.corepot.com/healthz