Add pre-match support for auto redirect

This commit is contained in:
世界
2025-12-26 15:52:28 +08:00
parent a34868468f
commit 78b4eac974
17 changed files with 354 additions and 11 deletions

View File

@@ -4,6 +4,7 @@ icon: material/new-box
!!! quote "Changes in sing-box 1.13.0"
:material-plus: [bypass](#bypass)
:material-alert: [reject](#reject)
!!! quote "Changes in sing-box 1.12.0"
@@ -44,6 +45,40 @@ Tag of target outbound.
See `route-options` fields below.
### bypass
!!! question "Since sing-box 1.13.0"
!!! quote ""
Only supported on Linux with `auto_redirect` enabled.
```json
{
"action": "bypass",
"outbound": "",
... // route-options Fields
}
```
`bypass` routes connection to the specified outbound.
For tun connections in [pre-match](/configuration/shared/pre-match/),
the connection will bypass sing-box and connect directly at the kernel level.
For non-tun connections and already established connections, the behavior is the same as `route`.
#### outbound
==Required==
Tag of target outbound.
#### route-options Fields
See `route-options` fields below.
### reject
!!! quote "Changes in sing-box 1.13.0"