mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-29 20:11:28 +00:00
106 lines
2 KiB
Markdown
106 lines
2 KiB
Markdown
```json
|
||
{
|
||
"dns": {
|
||
"servers": [
|
||
{
|
||
"tag": "google",
|
||
"address": "tls://8.8.8.8"
|
||
},
|
||
{
|
||
"tag": "local",
|
||
"address": "223.5.5.5",
|
||
"detour": "direct"
|
||
},
|
||
{
|
||
"tag": "remote",
|
||
"address": "fakeip"
|
||
},
|
||
{
|
||
"tag": "block",
|
||
"address": "rcode://success"
|
||
}
|
||
],
|
||
"rules": [
|
||
{
|
||
"geosite": "category-ads-all",
|
||
"server": "block",
|
||
"disable_cache": true
|
||
},
|
||
{
|
||
"outbound": "any",
|
||
"server": "local"
|
||
},
|
||
{
|
||
"geosite": "cn",
|
||
"server": "local"
|
||
},
|
||
{
|
||
"query_type": [
|
||
"A",
|
||
"AAAA"
|
||
],
|
||
"server": "remote"
|
||
}
|
||
],
|
||
"fakeip": {
|
||
"enabled": true,
|
||
"inet4_range": "198.18.0.0/15",
|
||
"inet6_range": "fc00::/18"
|
||
},
|
||
"independent_cache": true,
|
||
"strategy": "ipv4_only"
|
||
},
|
||
"inbounds": [
|
||
{
|
||
"type": "tun",
|
||
"inet4_address": "172.19.0.1/30",
|
||
"auto_route": true,
|
||
"sniff": true,
|
||
"domain_strategy": "ipv4_only" // 如果您想在远程解析域,删除此行 (如果服务器程序不为 sing-box,可能由于错误的行为导致 UDP 无法使用)。
|
||
}
|
||
],
|
||
"outbounds": [
|
||
{
|
||
"type": "shadowsocks",
|
||
"tag": "proxy",
|
||
"server": "mydomain.com",
|
||
"server_port": 8080,
|
||
"method": "2022-blake3-aes-128-gcm",
|
||
"password": "8JCsPssfgS8tiRwiMlhARg=="
|
||
},
|
||
{
|
||
"type": "direct",
|
||
"tag": "direct"
|
||
},
|
||
{
|
||
"type": "block",
|
||
"tag": "block"
|
||
},
|
||
{
|
||
"type": "dns",
|
||
"tag": "dns-out"
|
||
}
|
||
],
|
||
"route": {
|
||
"rules": [
|
||
{
|
||
"protocol": "dns",
|
||
"outbound": "dns-out"
|
||
},
|
||
{
|
||
"geosite": "cn",
|
||
"geoip": [
|
||
"private",
|
||
"cn"
|
||
],
|
||
"outbound": "direct"
|
||
},
|
||
{
|
||
"geosite": "category-ads-all",
|
||
"outbound": "block"
|
||
}
|
||
],
|
||
"auto_detect_interface": true
|
||
}
|
||
}
|
||
``` |