sing-box/docs/configuration/route/index.md

129 lines
2.8 KiB
Markdown
Raw Normal View History

---
icon: material/new-box
---
2022-08-25 13:08:29 +00:00
# Route
!!! quote "Changes in sing-box 1.11.0"
:material-plus: [default_network_strategy](#default_network_strategy)
:material-plus: [default_network_type](#default_network_type)
:material-plus: [default_fallback_network_type](#default_fallback_network_type)
:material-alert: [default_fallback_delay](#default_fallback_delay)
2023-12-01 05:24:18 +00:00
!!! quote "Changes in sing-box 1.8.0"
:material-plus: [rule_set](#rule_set)
:material-delete-clock: [geoip](#geoip)
:material-delete-clock: [geosite](#geosite)
2022-07-08 12:15:45 +00:00
### Structure
```json
{
"route": {
"geoip": {},
"geosite": {},
"rules": [],
2023-12-01 05:24:18 +00:00
"rule_set": [],
"final": "",
2022-07-15 03:51:51 +00:00
"auto_detect_interface": false,
2022-09-09 07:40:35 +00:00
"override_android_vpn": false,
"default_interface": "",
"default_mark": 0,
"default_network_strategy": "",
"default_network_type": [],
"default_fallback_network_type": [],
"default_fallback_delay": ""
2022-07-08 12:15:45 +00:00
}
}
```
!!! note ""
You can ignore the JSON Array [] tag when the content is only one item
2022-07-08 12:15:45 +00:00
### Fields
2023-12-01 05:24:18 +00:00
#### rules
List of [Route Rule](./rule/)
#### rule_set
!!! question "Since sing-box 1.8.0"
2024-06-25 16:45:10 +00:00
List of [rule-set](/configuration/rule-set/)
2022-07-08 12:15:45 +00:00
#### final
Default outbound tag. the first outbound will be used if empty.
#### auto_detect_interface
!!! quote ""
2022-08-05 08:55:46 +00:00
Only supported on Linux, Windows and macOS.
2022-09-09 07:40:35 +00:00
Bind outbound connections to the default NIC by default to prevent routing loops under tun.
2022-07-15 03:51:51 +00:00
Takes no effect if `outbound.bind_interface` is set.
2022-09-09 07:40:35 +00:00
#### override_android_vpn
!!! quote ""
2022-09-09 07:40:35 +00:00
Only supported on Android.
Accept Android VPN as upstream NIC when `auto_detect_interface` enabled.
2022-07-15 03:51:51 +00:00
#### default_interface
!!! quote ""
2022-07-15 03:51:51 +00:00
2022-08-05 08:55:46 +00:00
Only supported on Linux, Windows and macOS.
2022-07-15 03:51:51 +00:00
2022-09-09 07:40:35 +00:00
Bind outbound connections to the specified NIC by default to prevent routing loops under tun.
2022-07-15 03:51:51 +00:00
Takes no effect if `auto_detect_interface` is set.
2022-07-27 04:03:07 +00:00
#### default_mark
!!! quote ""
2022-07-27 04:03:07 +00:00
2022-08-04 14:01:20 +00:00
Only supported on Linux.
2022-07-27 04:03:07 +00:00
Set routing mark by default.
2022-07-27 04:03:07 +00:00
Takes no effect if `outbound.routing_mark` is set.
#### default_network_strategy
!!! question "Since sing-box 1.11.0"
See [Dial Fields](/configuration/shared/dial/#network_strategy) for details.
Takes no effect if `outbound.bind_interface`, `outbound.inet4_bind_address` or `outbound.inet6_bind_address` is set.
Can be overrides by `outbound.network_strategy`.
Conflicts with `default_interface`.
#### default_network_type
!!! question "Since sing-box 1.11.0"
See [Dial Fields](/configuration/shared/dial/#network_type) for details.
#### default_fallback_network_type
!!! question "Since sing-box 1.11.0"
See [Dial Fields](/configuration/shared/dial/#fallback_network_type) for details.
#### default_fallback_delay
!!! question "Since sing-box 1.11.0"
See [Dial Fields](/configuration/shared/dial/#fallback_delay) for details.