Improve resolve action

This commit is contained in:
世界
2025-02-20 15:13:14 +08:00
parent f18889369f
commit c1189e2a7b
7 changed files with 103 additions and 26 deletions

View File

@@ -5,7 +5,10 @@ icon: material/new-box
!!! quote "Changes in sing-box 1.12.0"
:material-plus: [tls_fragment](#tls_fragment)
:material-plus: [tls_fragment_fallback_delay](#tls_fragment_fallback_delay)
:material-plus: [tls_fragment_fallback_delay](#tls_fragment_fallback_delay)
:material-plus: [resolve.disable_cache](#disable_cache)
:material-plus: [resolve.rewrite_ttl](#rewrite_ttl)
:material-plus: [resolve.client_subnet](#client_subnet)
## Final actions
@@ -210,19 +213,44 @@ Timeout for sniffing.
```json
{
"action": "resolve",
"server": "",
"strategy": "",
"server": ""
"disable_cache": false,
"rewrite_ttl": null,
"client_subnet": null
}
```
`resolve` resolve request destination from domain to IP addresses.
#### server
Specifies DNS server tag to use instead of selecting through DNS routing.
#### strategy
DNS resolution strategy, available values are: `prefer_ipv4`, `prefer_ipv6`, `ipv4_only`, `ipv6_only`.
`dns.strategy` will be used by default.
#### server
#### disable_cache
Specifies DNS server tag to use instead of selecting through DNS routing.
!!! question "Since sing-box 1.12.0"
Disable cache and save cache in this query.
#### rewrite_ttl
!!! question "Since sing-box 1.12.0"
Rewrite TTL in DNS responses.
#### client_subnet
!!! question "Since sing-box 1.12.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`.