@
shuiduoduo #1 试了一下, 安卓都没问题,规则应该是没错的
{
"experimental": {
"clash_api": {
"external_controller": "0.0.0.0:9090",
"external_ui": "ui",
"external_ui_download_url": "
https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip",
"external_ui_download_detour": "select"
},
"cache_file": {
"enabled": true,
"store_fakeip": true
}
},
"log": {
"disabled": false,
"level": "info",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "local",
"address": "local"
},
{
"tag": "cloudflare",
"address": "https://1.1.1.1/dns-query",
"address_resolver": "local"
},
{
"tag": "dnspod",
"address": "https://1.12.12.12/dns-query",
"detour": "direct"
},
{ "tag": "dns-cn", "address": "223.5.5.5", "detour": "direct" }
],
"rules": [
{
"outbound": "any",
"server": "dnspod"
},
{
"clash_mode": "Direct",
"server": "dnspod"
},
{
"clash_mode": "Global",
"server": "cloudflare"
},
{
"type": "logical",
"mode": "and",
"rules": [
{
"geosite": "google@cn",
"invert": true
},
{
"geosite": ["cn"]
}
],
"server": "dnspod"
}
],
"final": "cloudflare",
"strategy": "prefer_ipv4"
},
"inbounds": [
{
"type": "socks",
"tag": "socks-in",
"listen": "::",
"listen_port": 6154,
"sniff": true
},
{
"type": "socks",
"tag": "socks-in",
"listen": "::",
"listen_port": 6153,
"sniff": true,
"sniff_override_destination": true
},
{
"type": "http",
"tag": "http-in",
"listen": "::",
"listen_port": 6152,
"sniff": true,
"sniff_override_destination": true
},
{
"type": "tun",
"tag": "tun-in",
"inet4_address": "172.19.0.1/30",
"mtu": 9000,
"auto_route": true,
"strict_route": true,
"stack": "gvisor",
"sniff": true,
"udp_timeout": 60,
"sniff_override_destination": true,
"inet4_route_address": [
"224.0.0.0/3",
"208.0.0.0/4",
"200.0.0.0/5",
"196.0.0.0/6",
"194.0.0.0/7",
"193.0.0.0/8",
"192.192.0.0/10",
"192.176.0.0/12",
"192.172.0.0/14",
"192.170.0.0/15",
"192.169.0.0/16",
"192.160.0.0/13",
"192.128.0.0/11",
"192.0.0.0/9",
"176.0.0.0/4",
"174.0.0.0/7",
"173.0.0.0/8",
"172.128.0.0/9",
"172.64.0.0/10",
"172.32.0.0/11",
"172.0.0.0/12",
"168.0.0.0/6",
"160.0.0.0/5",
"128.0.0.0/3",
"64.0.0.0/2",
"32.0.0.0/3",
"16.0.0.0/4",
"12.0.0.0/6",
"11.0.0.0/8",
"8.0.0.0/7",
"0.0.0.0/5"
]
}
],
"outbounds": [
{
"type": "shadowsocks",
...
},
{
"type": "shadowsocks",
...
},
{
"type": "shadowsocks",
...
},
{
"type": "vmess",
...
},
{
"type": "vmess",
...
},
{
"type": "direct",
"tag": "direct"
},
{
"type": "selector",
"tag": "other",
"outbounds": ["...."]
},
{
"type": "dns",
"tag": "dns"
},
{
"type": "selector",
"tag": "cloudcone",
"outbounds": [ "..."]
},
{
"type": "selector",
"tag": "select",
"outbounds": ["...", "other"]
},
{
"type": "block",
"tag": "block"
}
],
"route": {
"rule_set": [
{
"tag": "geoip-cn",
"type": "local",
"format": "binary",
"path": "/root/sing-box/rule-set/geoip-cn.srs"
},
{
"tag": "geosite-google",
"type": "local",
"format": "binary",
"path": "/root/sing-box/rule-set/geosite-google.srs"
},
{
"tag": "geosite-amazon",
"type": "local",
"format": "binary",
"path": "/root/sing-box/rule-set/geosite-amazon.srs"
},
{
"tag": "geosite-microsoft",
"type": "local",
"format": "binary",
"path": "/root/sing-box/rule-set/geosite-microsoft.srs"
},
{
"tag": "geosite-apple",
"type": "local",
"format": "binary",
"path": "/root/sing-box/rule-set/geosite-apple.srs"
},
{
"tag": "geosite-github",
"type": "local",
"format": "binary",
"path": "/root/sing-box/rule-set/geosite-github.srs"
}
],
"rules": [
{
"protocol": "dns",
"outbound": "dns"
},
{
"network": "udp",
"port": 53,
"outbound": "dns"
},
{
"clash_mode": "Direct",
"outbound": "direct"
},
{
"clash_mode": "Global",
"outbound": "select"
},
{
"domain_keyword": ["whatsapp"],
"outbound": "other"
}
{
"type": "logical",
"mode": "and",
"rules": [
{
"geosite": "google@cn",
"invert": true
},
{
"geosite": ["cn"],
"geoip": ["cn", "private"]
}
],
"outbound": "direct"
}
],
"auto_detect_interface": true,
"final": "select"
}
}