🖥️ DNS over HTTPS Server

纯 DoH 服务 | 多记录类型 | 支持 GET/POST & Wire Format

📊 服务状态

🔗 DoH 端点:

🌐 上游 DNS 服务器

状态上游服务器区域响应时间

🔧 DNS 查询工具

📖 使用示例

以下命令中的端点 https://lzy1258-panel.hf.space/AiLee 已自动替换为您的实际地址,可直接复制运行。
1️⃣ GET 请求 – JSON 格式(?name=)
# A 记录 (IPv4) curl -H "accept: application/dns-json" \ "https://lzy1258-panel.hf.space/AiLee?name=google.com&type=A"
# AAAA 记录 (IPv6) curl -H "accept: application/dns-json" \ "https://lzy1258-panel.hf.space/AiLee?name=google.com&type=AAAA"
# HTTPS 记录 (ECH 配置) curl -H "accept: application/dns-json" \ "https://lzy1258-panel.hf.space/AiLee?name=cloudflare-ech.com&type=HTTPS"
预期:返回 JSON,Answer 中包含对应记录。
2️⃣ GET 请求 – Wire Format(?dns=)
# 查询 google.com A 记录(Base64URL 编码示例) curl -H "accept: application/dns-message" \ "https://lzy1258-panel.hf.space/AiLee?dns=AAABAAABAAAAAAAAB2V4YW1wbGUDY29tAAABAAE"
预期:返回二进制 DNS 数据(终端会显示乱码,这是正常的)。
验证响应头:content-type: application/dns-message
3️⃣ POST 请求 – JSON Body
# A 记录查询 curl -X POST -H "Content-Type: application/dns-json" \ -d '{"name":"google.com","type":"A"}' \ "https://lzy1258-panel.hf.space/AiLee"
# HTTPS 记录查询 curl -X POST -H "Content-Type: application/dns-json" \ -d '{"name":"cloudflare-ech.com","type":"HTTPS"}' \ "https://lzy1258-panel.hf.space/AiLee"
预期:返回 JSON,Answer 中包含记录。
4️⃣ POST 请求 – 表单格式
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" \ -d "name=google.com&type=A" \ "https://lzy1258-panel.hf.space/AiLee"
预期:返回 JSON,Answer 中包含 IPv4 地址。
5️⃣ POST 请求 – Wire Format(原始二进制)
# 发送二进制数据 echo -n "AAABAAABAAAAAAAAB2V4YW1wbGUDY29tAAABAAE" | base64 -d > query.bin curl -X POST -H "Content-Type: application/dns-message" --data-binary @query.bin \ "https://lzy1258-panel.hf.space/AiLee"
预期:返回二进制 DNS 响应(终端显示乱码)。
验证响应头:content-type: application/dns-message
🌐 浏览器访问 & 配置 DoH
# 浏览器直接访问(显示 JSON) https://lzy1258-panel.hf.space/AiLee?name=google.com&type=A # Chrome/Edge 配置 DoH 设置 → 隐私和安全 → 安全 → 使用安全 DNS → 自定义 填入:https://lzy1258-panel.hf.space/AiLee
点击链接直接查看查询结果,或复制 DoH 端点地址填入浏览器设置。
🔍 诊断辅助命令
# 查看完整响应头(确认 Content-Type) curl -I "https://lzy1258-panel.hf.space/AiLee?name=google.com&type=A"
# 查看 wire format 响应头 curl -I -H "accept: application/dns-message" \ "https://lzy1258-panel.hf.space/AiLee?dns=AAABAAABAAAAAAAAB2V4YW1wbGUDY29tAAABAAE"
# 保存 wire format 响应到文件(避免终端乱码) curl -H "accept: application/dns-message" \ "https://lzy1258-panel.hf.space/AiLee?dns=AAABAAABAAAAAAAAB2V4YW1wbGUDY29tAAABAAE" \ --output response.bin
每个命令独立复制,方便按需使用。