dnsquery/README.md
Ubuntu ec23258cc9 feat: launch DNS query MVP
Co-authored-by: multica-agent <github@multica.ai>
2026-08-03 17:42:44 +00:00

39 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# DNS Global
无需注册的轻量 DNS 传播检查工具。React 前端通过 SSE 实时展示 Go API 并行查询 Cloudflare、Google、AdGuard 和 AliDNS 的结果。
> 当前节点是公共 DNS 服务商的 Anycast 解析器,只能反映不同服务商的缓存差异,不代表真实地理位置。生产版可将后端 `nodes` 替换为各区域自建探针。
## 快速启动
```bash
docker compose up --build
```
打开 <http://localhost:8080>。停止服务:
```bash
docker compose down
```
## API
```bash
curl -X POST http://localhost:8080/api/dns/query \
-H 'Content-Type: application/json' \
-d '{"domain":"example.com","type":"A"}'
```
随后连接返回的查询 ID`GET /api/dns/query/{queryId}/events`。
支持 `A`、`AAAA`、`CNAME`、`MX`、`NS`、`TXT`、`SOA` 和 `CAA`。输入 URL 时会自动提取域名。查询任务仅在内存保留五分钟POST 接口按来源 IP 限制为每分钟 30 次。
## 验证
```bash
docker build -t dnsquery:test .
docker compose up -d
curl --fail http://localhost:8080/healthz
docker compose down
```