跳转到主要内容
GET
/
dns
/
query
DNS 查询
curl --request GET \
  --url http://{host}:{port}/dns/query \
  --header 'Authorization: Bearer <token>'
{
  "Status": 0,
  "Question": [
    {
      "Name": "example.com.",
      "Qtype": 1,
      "Qclass": 1
    }
  ],
  "Answer": [
    {
      "TTL": 274,
      "data": "104.20.23.154",
      "name": "example.com.",
      "type": 1
    }
  ],
  "RA": true,
  "RD": true,
  "AD": false,
  "CD": false,
  "TC": false
}

授权

Authorization
string
header
必填

在请求头中携带 Authorization: Bearer ${secret},其中 secret 对应配置中的 secret 字段。若未设置 secret 可省略,但强烈建议设置。

查询参数

name
string
必填

要查询的域名。

示例:

"example.com"

type
string

记录类型,如 A、AAAA、TXT 等。

示例:

"A"

响应

200 - application/json

DNS 查询结果。

The response is of type object.

最后修改于 2026年6月23日