-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
44298f0
commit 58913be
Showing
21 changed files
with
898 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
icon: material/new-box | ||
--- | ||
|
||
# DNS Rule Action | ||
|
||
!!! question "Since sing-box 1.11.0" | ||
|
||
### route | ||
|
||
```json | ||
{ | ||
"action": "route", // default | ||
"server": "", | ||
"disable_cache": false, | ||
"rewrite_ttl": 0, | ||
"client_subnet": null | ||
} | ||
``` | ||
|
||
`route` inherits the classic rule behavior of routing DNS requests to the specified server. | ||
|
||
#### server | ||
|
||
==Required== | ||
|
||
Tag of target server. | ||
|
||
#### disable_cache | ||
|
||
Disable cache and save cache in this query. | ||
|
||
#### rewrite_ttl | ||
|
||
Rewrite TTL in DNS responses. | ||
|
||
#### client_subnet | ||
|
||
!!! question "Since sing-box 1.9.0" | ||
|
||
Append a `edns0-subnet` OPT extra record with the specified IP prefix to every query by default. | ||
|
||
If value is an IP address instead of prefix, `/32` or `/128` will be appended automatically. | ||
|
||
Will overrides `dns.client_subnet` and `servers.[].client_subnet`. | ||
|
||
### reject | ||
|
||
```json | ||
{ | ||
"action": "reject", | ||
"method": "default", // default | ||
"no_drop": false | ||
} | ||
``` | ||
|
||
`reject` reject DNS requests. | ||
|
||
#### method | ||
|
||
- `default`: Reply with NXDOMAIN. | ||
- `drop`: Drop the request. | ||
|
||
#### no_drop | ||
|
||
If not enabled, `method` will be temporarily overwritten to `drop` after 50 triggers in 30s. | ||
|
||
Not available when `method` is set to drop. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
icon: material/new-box | ||
--- | ||
|
||
# DNS 规则动作 | ||
|
||
!!! question "自 sing-box 1.11.0 起" | ||
|
||
### route | ||
|
||
```json | ||
{ | ||
"action": "route", // 默认 | ||
"server": "", | ||
"disable_cache": false, | ||
"rewrite_ttl": 0, | ||
"client_subnet": null | ||
} | ||
``` | ||
|
||
`route` 继承了将 DNS 请求 路由到指定服务器的经典规则动作。 | ||
|
||
#### server | ||
|
||
==必填== | ||
|
||
目标 DNS 服务器的标签。 | ||
|
||
#### disable_cache | ||
|
||
在此查询中禁用缓存。 | ||
|
||
#### rewrite_ttl | ||
|
||
重写 DNS 回应中的 TTL。 | ||
|
||
#### client_subnet | ||
|
||
!!! question "自 sing-box 1.9.0 起" | ||
|
||
默认情况下,将带有指定 IP 前缀的 `edns0-subnet` OPT 附加记录附加到每个查询。 | ||
|
||
如果值是 IP 地址而不是前缀,则会自动附加 `/32` 或 `/128`。 | ||
|
||
将覆盖 `dns.client_subnet` 与 `servers.[].client_subnet`。 | ||
|
||
### reject | ||
|
||
```json | ||
{ | ||
"action": "reject", | ||
"method": "default", // default | ||
"no_drop": false | ||
} | ||
``` | ||
|
||
`reject` 拒绝 DNS 请求。 | ||
|
||
#### method | ||
|
||
- `default`: 返回 NXDOMAIN。 | ||
- `drop`: 丢弃请求。 | ||
|
||
#### no_drop | ||
|
||
如果未启用,则 30 秒内触发 50 次后,`method` 将被暂时覆盖为 `drop`。 | ||
|
||
当 `method` 设为 `drop` 时不可用。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.