Sing-Box Route

This refers to a set of rules that determines how traffic is forwarded from a client to a server. Depending on the rules, some traffic can be routed through VPN tunnels and some through direct ISP connection.

Using this feature (Split Tunneling) means the hassle of connecting & disconnecting from a VPN is over.

You can use Sing-Box route config to specify more complex routing rules, such as routing traffic based on the domain name, IP, or the port number. You can also use it to route traffic through multiple outbound connections.

SingBox Route Rule example:

"route": {
	"geoip": {
		"path": "geoip.db",
		"download_url": "https://raw.githubusercontent.com/CHIZI-0618/v2ray-rules-dat/release/geoip.db",
		"download_detour": "direct"
	},
	"geosite": {
		"path": "geosite.db",
		"download_url": "https://github.com/yangchuansheng/sing-geosite/releases/latest/download/geosite.db",
		"download_detour": "direct"
	},
	"rules": [{
			"protocol": "dns",
			"outbound": "dns-out"
		}, {
			"geosite": [
				"category-ads-all"
			],
			"domain_keyword": [
				"yektanet",
				"adengine.telewebion.com"
			],
			"outbound": "block"
		},
		{
			"geoip": "private",
			"domain_suffix": [
				".ir",
				"aparat.com",
				"digikala.com",
				"telewebion.com",
				"varzesh3.com"
			],
			"port": [
				22,
				3389
			],
			"outbound": "direct"
		}
	],
	"final": "shadowsocks-out",
	"auto_detect_interface": true
}Code language: JSON / JSON with Comments (json)

Review other configurations for the Singbox, such as Log and DNS settings, inbounds and outbounds, and its experimental features.

I also briefly discussed what geosite.db and geoip.db are. These compressed domains and IP address lists are used in the routing process.