DNS outbound: rename qtype to qType

This commit is contained in:
Meow
2026-06-01 06:28:53 +08:00
parent 32dac732e7
commit dac4a89607
3 changed files with 18 additions and 18 deletions
+6 -6
View File
@@ -29,7 +29,7 @@ DNS 是一个出站协议,用于接收由 routing 送入的 DNS 查询,并
},
{
"action": "direct",
"qtype": 65,
"qType": 65,
"domain": ["geosite:geolocation-!cn"]
}
]
@@ -61,7 +61,7 @@ DNS 是一个出站协议,用于接收由 routing 送入的 DNS 查询,并
> `rules`: \[[RuleObject](#ruleobject)\]
按顺序匹配 DNS 查询规则,并支持按 `qtype``domain` 进行细粒度控制。
按顺序匹配 DNS 查询规则,并支持按 `qType``domain` 进行细粒度控制。
若未命中任何规则,则使用内置兜底规则:A 和 AAAA 查询会被导入内置 DNS 模块,其它类型会被显式拒绝。
@@ -70,7 +70,7 @@ DNS 是一个出站协议,用于接收由 routing 送入的 DNS 查询,并
```json
{
"action": "hijack",
"qtype": 1,
"qType": 1,
"domain": ["geosite:cn"]
}
```
@@ -86,12 +86,12 @@ DNS 是一个出站协议,用于接收由 routing 送入的 DNS 查询,并
- `drop`: 直接丢弃请求,不返回响应。
- `reject`: 返回显式拒绝响应,相比 `drop` 可以避免部分应用长时间等待 DNS 超时或反复重试。
> `qtype`: number | string
> `qType`: number | string
匹配 DNS 查询类型,形式如下:
- 整型数值 具体的查询类型,如 `"qtype": 1` 代表 A 查询,`"qtype": 28` 代表 AAAA 查询。
- 字符串:可以是一个只有数字的字符串,如 `"qtype": "28"`;或者一个数值范围,如 `"qtype": "5-10"` 表示type 5 到 type 10,这 6 个类型。可以使用逗号进行分段,如 `11,13,15-17` 表示type 11、type 13、type 15 到 type 17 这 5 个类型。
- 整型数值 具体的查询类型,如 `"qType": 1` 代表 A 查询,`"qType": 28` 代表 AAAA 查询。
- 字符串:可以是一个只有数字的字符串,如 `"qType": "28"`;或者一个数值范围,如 `"qType": "5-10"` 表示type 5 到 type 10,这 6 个类型。可以使用逗号进行分段,如 `11,13,15-17` 表示type 11、type 13、type 15 到 type 17 这 5 个类型。
具体数字编号可参考 [IANA 文档](https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml)。
+6 -6
View File
@@ -29,7 +29,7 @@ It can allow queries to the target DNS server, `hijack` them to the built-in [DN
},
{
"action": "direct",
"qtype": 65,
"qType": 65,
"domain": ["geosite:geolocation-!cn"]
}
]
@@ -61,7 +61,7 @@ The value of `userLevel` corresponds to the `level` value in [policy](../policy.
> `rules`: \[[RuleObject](#ruleobject)\]
Matches DNS query rules in order, and supports fine-grained control by `qtype` and `domain`.
Matches DNS query rules in order, and supports fine-grained control by `qType` and `domain`.
If no rule is matched, the built-in fallback rule is used: A and AAAA queries are imported into the built-in DNS module, while other query types are explicitly refused.
@@ -70,7 +70,7 @@ If no rule is matched, the built-in fallback rule is used: A and AAAA queries ar
```json
{
"action": "hijack",
"qtype": 1,
"qType": 1,
"domain": ["geosite:cn"]
}
```
@@ -86,12 +86,12 @@ Defines the action to take when the rule matches.
- `drop`: Drops the request directly without returning a response.
- `reject`: Returns an explicit refusal response. Compared with `drop`, this can prevent some applications from waiting too long for a DNS timeout or repeatedly retrying.
> `qtype`: number | string
> `qType`: number | string
Matches DNS query types. The forms are as follows:
- Integer value: a specific query type, such as `"qtype": 1` for an A query, or `"qtype": 28` for an AAAA query.
- String: can be a digits-only string such as `"qtype": "28"`, or a numeric range such as `"qtype": "5-10"`, which represents the 6 types from type 5 to type 10. Commas can be used for segmentation, such as `11,13,15-17`, which represents the 5 types: type 11, type 13, and type 15 to type 17.
- Integer value: a specific query type, such as `"qType": 1` for an A query, or `"qType": 28` for an AAAA query.
- String: can be a digits-only string such as `"qType": "28"`, or a numeric range such as `"qType": "5-10"`, which represents the 6 types from type 5 to type 10. Commas can be used for segmentation, such as `11,13,15-17`, which represents the 5 types: type 11, type 13, and type 15 to type 17.
For specific type numbers, refer to the [IANA documentation](https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml).
+6 -6
View File
@@ -29,7 +29,7 @@ DNS — это исходящий протокол, который приним
},
{
"action": "direct",
"qtype": 65,
"qType": 65,
"domain": ["geosite:geolocation-!cn"]
}
]
@@ -61,7 +61,7 @@ DNS — это исходящий протокол, который приним
> `rules`: \[[RuleObject](#ruleobject)\]
DNS-запросы сопоставляются с правилами по порядку; поддерживается детальное управление по `qtype` и `domain`.
DNS-запросы сопоставляются с правилами по порядку; поддерживается детальное управление по `qType` и `domain`.
Если ни одно правило не совпало, используется встроенное правило по умолчанию: запросы A и AAAA направляются во встроенный DNS-модуль, а запросы других типов явно отклоняются.
@@ -70,7 +70,7 @@ DNS-запросы сопоставляются с правилами по по
```json
{
"action": "hijack",
"qtype": 1,
"qType": 1,
"domain": ["geosite:cn"]
}
```
@@ -86,12 +86,12 @@ DNS-запросы сопоставляются с правилами по по
- `drop`: напрямую отбрасывает запрос и не возвращает ответ.
- `reject`: возвращает явный отказ. По сравнению с `drop`, это может предотвратить долгое ожидание DNS timeout или повторные попытки у некоторых приложений.
> `qtype`: number | string
> `qType`: number | string
Сопоставляет типы DNS-запросов. Формы записи:
- Целое число: конкретный тип запроса, например `"qtype": 1` соответствует запросу A, `"qtype": 28` — запросу AAAA.
- Строка: может быть строкой только из цифр, например `"qtype": "28"`; или диапазоном значений, например `"qtype": "5-10"` — это типы с 5 по 10, всего 6 типов. Можно использовать запятую для разделения, например `11,13,15-17` — это 5 типов: тип 11, тип 13 и типы с 15 по 17.
- Целое число: конкретный тип запроса, например `"qType": 1` соответствует запросу A, `"qType": 28` — запросу AAAA.
- Строка: может быть строкой только из цифр, например `"qType": "28"`; или диапазоном значений, например `"qType": "5-10"` — это типы с 5 по 10, всего 6 типов. Можно использовать запятую для разделения, например `11,13,15-17` — это 5 типов: тип 11, тип 13 и типы с 15 по 17.
Конкретные номера типов смотрите в [документации IANA](https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml).