2022-08-25 21:08:29 +08:00
|
|
|
# Route
|
|
|
|
|
2023-12-01 13:24:18 +08: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 20:15:45 +08:00
|
|
|
### Structure
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"route": {
|
|
|
|
"geoip": {},
|
|
|
|
"geosite": {},
|
|
|
|
"rules": [],
|
2023-12-01 13:24:18 +08:00
|
|
|
"rule_set": [],
|
2022-07-10 16:41:38 +08:00
|
|
|
"final": "",
|
2022-07-15 11:51:51 +08:00
|
|
|
"auto_detect_interface": false,
|
2022-09-09 15:40:35 +08:00
|
|
|
"override_android_vpn": false,
|
2022-07-27 12:03:07 +08:00
|
|
|
"default_interface": "en0",
|
|
|
|
"default_mark": 233
|
2022-07-08 20:15:45 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Fields
|
|
|
|
|
2023-12-01 13:24:18 +08:00
|
|
|
| Key | Format |
|
|
|
|
|-----------|----------------------|
|
|
|
|
| `geoip` | [GeoIP](./geoip/) |
|
|
|
|
| `geosite` | [Geosite](./geosite/) |
|
|
|
|
|
|
|
|
#### rules
|
|
|
|
|
|
|
|
List of [Route Rule](./rule/)
|
|
|
|
|
|
|
|
#### rule_set
|
|
|
|
|
|
|
|
!!! question "Since sing-box 1.8.0"
|
|
|
|
|
|
|
|
List of [Rule Set](/configuration/rule-set/)
|
2022-07-08 20:15:45 +08:00
|
|
|
|
|
|
|
#### final
|
|
|
|
|
2022-07-10 16:41:38 +08:00
|
|
|
Default outbound tag. the first outbound will be used if empty.
|
|
|
|
|
|
|
|
#### auto_detect_interface
|
|
|
|
|
2023-11-09 17:04:08 +08:00
|
|
|
!!! quote ""
|
2022-07-10 16:41:38 +08:00
|
|
|
|
2022-08-05 16:55:46 +08:00
|
|
|
Only supported on Linux, Windows and macOS.
|
2022-07-10 16:41:38 +08:00
|
|
|
|
2022-09-09 15:40:35 +08:00
|
|
|
Bind outbound connections to the default NIC by default to prevent routing loops under tun.
|
2022-07-10 16:41:38 +08:00
|
|
|
|
2022-07-15 11:51:51 +08:00
|
|
|
Takes no effect if `outbound.bind_interface` is set.
|
|
|
|
|
2022-09-09 15:40:35 +08:00
|
|
|
#### override_android_vpn
|
|
|
|
|
2023-11-09 17:04:08 +08:00
|
|
|
!!! quote ""
|
2022-09-09 15:40:35 +08:00
|
|
|
|
|
|
|
Only supported on Android.
|
|
|
|
|
|
|
|
Accept Android VPN as upstream NIC when `auto_detect_interface` enabled.
|
|
|
|
|
2022-07-15 11:51:51 +08:00
|
|
|
#### default_interface
|
|
|
|
|
2023-11-09 17:04:08 +08:00
|
|
|
!!! quote ""
|
2022-07-15 11:51:51 +08:00
|
|
|
|
2022-08-05 16:55:46 +08:00
|
|
|
Only supported on Linux, Windows and macOS.
|
2022-07-15 11:51:51 +08:00
|
|
|
|
2022-09-09 15:40:35 +08:00
|
|
|
Bind outbound connections to the specified NIC by default to prevent routing loops under tun.
|
2022-07-15 11:51:51 +08:00
|
|
|
|
|
|
|
Takes no effect if `auto_detect_interface` is set.
|
2022-07-27 12:03:07 +08:00
|
|
|
|
|
|
|
#### default_mark
|
|
|
|
|
2023-11-09 17:04:08 +08:00
|
|
|
!!! quote ""
|
2022-07-27 12:03:07 +08:00
|
|
|
|
2022-08-04 22:01:20 +08:00
|
|
|
Only supported on Linux.
|
2022-07-27 12:03:07 +08:00
|
|
|
|
2022-08-24 16:23:21 +08:00
|
|
|
Set routing mark by default.
|
2022-07-27 12:03:07 +08:00
|
|
|
|
|
|
|
Takes no effect if `outbound.routing_mark` is set.
|