1
0
mirror of https://github.com/nitezs/sub2sing-box.git synced 2024-12-23 21:54:42 -05:00
sub2sing-box/templates/example-linux.json

242 lines
5.6 KiB
JSON
Raw Normal View History

2024-03-12 14:02:17 -04:00
{
"log": {
"level": "info",
"timestamp": true
},
"dns": {
2024-09-30 13:27:22 -04:00
"independent_cache": true,
"fakeip": {
"enabled": true,
"inet4_range": "198.18.0.0/15",
"inet6_range": "fc00::/18"
},
"strategy": "prefer_ipv4",
2024-03-12 14:02:17 -04:00
"rules": [
{
"outbound": "any",
2024-09-30 13:27:22 -04:00
"server": "local"
2024-03-16 07:24:39 -04:00
},
2024-03-12 14:02:17 -04:00
{
"clash_mode": "Direct",
"server": "local"
},
{
"clash_mode": "Global",
"server": "google"
},
{
"rule_set": "geosite-geolocation-cn",
"server": "local"
},
{
"type": "logical",
"mode": "and",
"rules": [
{
2024-09-19 06:12:24 -04:00
"rule_set": "geosite-geolocation-!cn",
"invert": true
2024-03-12 14:02:17 -04:00
},
{
"rule_set": "geoip-cn"
}
],
"server": "google",
2024-09-19 06:12:24 -04:00
"client_subnet": "114.114.114.114/24"
},
{
"query_type": ["A", "AAAA"],
"server": "fakeip"
2024-03-12 14:02:17 -04:00
}
],
2024-09-30 13:27:22 -04:00
"servers": [
2024-03-12 14:02:17 -04:00
{
2024-09-30 13:27:22 -04:00
"address": "tls://8.8.8.8",
"tag": "google"
2024-03-12 14:02:17 -04:00
},
{
2024-09-30 13:27:22 -04:00
"address": "https://223.5.5.5/dns-query",
"detour": "direct",
"tag": "local"
2024-03-12 14:02:17 -04:00
},
{
2024-09-30 13:27:22 -04:00
"tag": "fakeip",
"address": "fakeip"
}
]
},
"inbounds": [
{
"type": "tun",
"auto_route": true,
2024-10-19 06:19:51 -04:00
"auto_redirect": true,
2024-09-30 13:27:22 -04:00
"strict_route": true,
2024-10-01 00:50:40 -04:00
"sniff": true,
2024-10-18 04:11:13 -04:00
"sniff_override_destination": true,
2024-10-19 06:19:51 -04:00
"address": ["172.16.0.1/30", "fdfe:dcba:9876::1/126"]
2024-09-30 13:27:22 -04:00
}
],
"outbounds": [
{
"outbounds": ["<all-proxy-tags>", "direct"],
"tag": "default",
"type": "selector"
},
{
"tag": "direct",
"type": "direct"
},
{
"tag": "block",
"type": "block"
},
{
"tag": "dns",
"type": "dns"
}
],
"route": {
"rules": [
2024-03-12 14:02:17 -04:00
{
2024-09-30 13:27:22 -04:00
"type": "logical",
"mode": "or",
"rules": [
{
"protocol": "dns"
},
{
"port": 53
}
],
"outbound": "dns"
2024-03-12 14:02:17 -04:00
},
{
2024-09-30 13:27:22 -04:00
"ip_is_private": true,
"outbound": "direct"
2024-03-12 14:02:17 -04:00
},
{
2024-09-30 13:27:22 -04:00
"clash_mode": "Direct",
"outbound": "direct"
2024-03-12 14:02:17 -04:00
},
{
2024-09-30 13:27:22 -04:00
"clash_mode": "Global",
"outbound": "default"
2024-03-12 14:02:17 -04:00
},
{
"type": "logical",
"mode": "or",
"rules": [
{
2024-09-30 13:27:22 -04:00
"port": 853
2024-03-12 14:02:17 -04:00
},
{
2024-09-30 13:27:22 -04:00
"network": "udp",
"port": 443
},
{
"protocol": "stun"
2024-03-12 14:02:17 -04:00
}
],
2024-09-30 13:27:22 -04:00
"outbound": "block"
2024-03-12 14:02:17 -04:00
},
{
2024-10-01 03:31:48 -04:00
"rule_set": ["geosite-google"],
"outbound": "default"
},
{
2024-10-03 02:30:45 -04:00
"type": "logical",
"mode": "or",
"rules": [
{
"rule_set": [
"geoip-cn",
"geosite-geolocation-cn",
"geosite-cn",
"geosite-category-games@cn",
"geosite-steam@cn"
]
2024-10-19 06:19:51 -04:00
}
2024-09-30 13:27:22 -04:00
],
2024-03-12 14:02:17 -04:00
"outbound": "direct"
2024-09-30 13:27:22 -04:00
}
],
"rule_set": [
{
"type": "remote",
"tag": "geosite-geolocation-cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs",
"download_detour": "default"
2024-03-12 14:02:17 -04:00
},
{
2024-09-30 13:27:22 -04:00
"type": "remote",
"tag": "geosite-geolocation-!cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-!cn.srs",
"download_detour": "default"
2024-03-12 14:02:17 -04:00
},
{
2024-09-30 13:27:22 -04:00
"type": "remote",
"tag": "geoip-cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
"download_detour": "default"
2024-03-12 14:02:17 -04:00
},
{
2024-09-30 13:27:22 -04:00
"type": "remote",
"tag": "geosite-category-games@cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-games@cn.srs",
"download_detour": "default"
2024-03-12 14:02:17 -04:00
},
{
2024-09-30 13:27:22 -04:00
"type": "remote",
"tag": "geosite-google@cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google@cn.srs",
"download_detour": "default"
2024-03-12 14:02:17 -04:00
},
{
2024-09-30 13:27:22 -04:00
"type": "remote",
"tag": "geosite-google-play@cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google-play@cn.srs",
"download_detour": "default"
2024-03-12 14:02:17 -04:00
},
{
2024-09-30 13:27:22 -04:00
"type": "remote",
"tag": "geosite-steam@cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-steam@cn.srs",
"download_detour": "default"
2024-03-12 14:02:17 -04:00
},
{
2024-09-30 13:27:22 -04:00
"type": "remote",
"tag": "geosite-cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs",
"download_detour": "default"
2024-10-01 03:31:48 -04:00
},
{
"type": "remote",
"tag": "geosite-google",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google.srs",
"download_detour": "default"
2024-03-12 14:02:17 -04:00
}
],
2024-09-30 13:27:22 -04:00
"final": "default",
2024-03-12 14:02:17 -04:00
"auto_detect_interface": true
},
"experimental": {
"cache_file": {
2024-10-01 00:50:40 -04:00
"enabled": true
2024-03-12 14:02:17 -04:00
},
"clash_api": {
"default_mode": "Enhanced",
"external_controller": "127.0.0.1:9090",
"external_ui": "./ui",
2024-09-30 13:27:22 -04:00
"external_ui_download_detour": "default"
2024-03-12 14:02:17 -04:00
}
}
}