documentation: sniff override destination

This commit is contained in:
CloseHandle 2024-11-23 22:26:28 +08:00
parent 06b84afea6
commit 6affde303e
6 changed files with 24 additions and 6 deletions

View File

@ -131,7 +131,8 @@ Not available when `method` is set to drop.
{
"action": "sniff",
"sniffer": [],
"timeout": ""
"timeout": "",
"override_destination": false
}
```
@ -153,6 +154,12 @@ Timeout for sniffing.
`300ms` is used by default.
### override_destination
Override the connection destination address with the sniffed domain.
If the domain name is invalid (like tor), this will not work.
### resolve
```json

View File

@ -129,7 +129,8 @@ icon: material/new-box
{
"action": "sniff",
"sniffer": [],
"timeout": ""
"timeout": "",
"override_destination": false
}
```
@ -151,6 +152,12 @@ icon: material/new-box
默认使用 300ms。
#### override_destination
用探测出的域名覆盖连接目标地址。
如果域名无效(如 Tor将不生效。
### resolve
```json

View File

@ -92,7 +92,7 @@ See [Protocol Sniff](/configuration/route/sniff/) for details.
!!! failure "Deprecated in sing-box 1.11.0"
Inbound fields are deprecated and will be removed in sing-box 1.13.0.
Inbound fields are deprecated and will be removed in sing-box 1.13.0, check [Migration](/migration/#migrate-legacy-inbound-fields-to-rule-actions).
Override the connection destination address with the sniffed domain.

View File

@ -93,7 +93,7 @@ UDP NAT 过期时间。
!!! failure "已在 sing-box 1.11.0 废弃"
入站字段已废弃且将在 sing-box 1.12.0 中被移除
入站字段已废弃且将在 sing-box 1.12.0 中被移除,参阅 [迁移指南](/migration/#migrate-legacy-inbound-fields-to-rule-actions).
用探测出的域名覆盖连接目标地址。

View File

@ -123,6 +123,7 @@ Inbound fields are deprecated and can be replaced by rule actions.
"type": "mixed",
"sniff": true,
"sniff_timeout": "1s",
"sniff_override_destination": true,
"domain_strategy": "prefer_ipv4"
}
]
@ -149,7 +150,8 @@ Inbound fields are deprecated and can be replaced by rule actions.
{
"inbound": "in",
"action": "sniff",
"timeout": "1s"
"timeout": "1s",
"override_destination": true
}
]
}

View File

@ -123,6 +123,7 @@ icon: material/arrange-bring-forward
"type": "mixed",
"sniff": true,
"sniff_timeout": "1s",
"sniff_override_destination": true,
"domain_strategy": "prefer_ipv4"
}
]
@ -149,7 +150,8 @@ icon: material/arrange-bring-forward
{
"inbound": "in",
"action": "sniff",
"timeout": "1s"
"timeout": "1s",
"override_destination": true
}
]
}