sing-box/docs/configuration/route/index.md
2024-11-29 10:55:17 +08:00

2.8 KiB

icon
material/new-box

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-plus: [default_fallback_delay](#default_fallback_delay)

!!! quote "Changes in sing-box 1.8.0"

:material-plus: [rule_set](#rule_set)  
:material-delete-clock: [geoip](#geoip)  
:material-delete-clock: [geosite](#geosite)

Structure

{
  "route": {
    "geoip": {},
    "geosite": {},
    "rules": [],
    "rule_set": [],
    "final": "",
    "auto_detect_interface": false,
    "override_android_vpn": false,
    "default_interface": "",
    "default_mark": 0,
    "default_network_strategy": "",
    "default_network_type": [],
    "default_fallback_network_type": [],
    "default_fallback_delay": ""
  }
}

!!! note ""

You can ignore the JSON Array [] tag when the content is only one item

Fields

rules

List of Route Rule

rule_set

!!! question "Since sing-box 1.8.0"

List of rule-set

final

Default outbound tag. the first outbound will be used if empty.

auto_detect_interface

!!! quote ""

Only supported on Linux, Windows and macOS.

Bind outbound connections to the default NIC by default to prevent routing loops under tun.

Takes no effect if outbound.bind_interface is set.

override_android_vpn

!!! quote ""

Only supported on Android.

Accept Android VPN as upstream NIC when auto_detect_interface enabled.

default_interface

!!! quote ""

Only supported on Linux, Windows and macOS.

Bind outbound connections to the specified NIC by default to prevent routing loops under tun.

Takes no effect if auto_detect_interface is set.

default_mark

!!! quote ""

Only supported on Linux.

Set routing mark by default.

Takes no effect if outbound.routing_mark is set.

default_network_strategy

!!! question "Since sing-box 1.11.0"

See Dial Fields 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 for details.

default_fallback_network_type

!!! question "Since sing-box 1.11.0"

See Dial Fields for details.

default_fallback_delay

!!! question "Since sing-box 1.11.0"

See Dial Fields for details.