{
"log": {
"disabled": false,
"level": "info",
"output": "/root/box.log",
"timestamp": true
},
"inbounds": [
{
"type": "socks",
"tag": "socks-in",
"listen": "::",
"listen_port": 443,
"tcp_fast_open": true,
"tcp_multi_path": true,
"sniff": true,
"sniff_override_destination": true,
"users": [
{
"username": "fangxi",
"password": "fangxi"
}
]
},
{
"type": "shadowsocks",
"tag": "ss-in",
"listen": "::",
"listen_port": 80,
"method": "aes-128-gcm",
"password": "", //sing-box generate rand 16 --base64
"tcp_multi_path": true,
"tcp_fast_open": true,
"sniff": true,
"sniff_override_destination": true,
"udp_disable_domain_unmapping": true,
"multiplex": {
"enabled": true,
"padding": true
}
}
],
"outbounds": [
{
"type": "direct",
"tag": "direct"
}
],
"route": {
"rules": [
{
"action": "sniff"
},
{
"protocol": [
"bittorrent"
],
"action": "reject",
"method": "default"
},
{
"inbound": [
"ss-in"
],
"outbound": "direct"
},
{
"inbound": [
"ss-in"
],
"outbound": "direct"
},
{
"rule_set": [
"geoip-cn",
"geosite-geolocation-cn",
"privateip",
"ads"
],
"action": "reject",
"method": "default"
},
{
"domain": [
"www.gstatic.com"
],
"outbound": "direct"
}
],
"rule_set": [
{
"type": "remote",
"tag": "privateip",
"format": "binary",
"url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/privateip.srs",
"download_detour": "direct"
},
{
"type": "remote",
"tag": "geosite-geolocation-cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs",
"download_detour": "direct"
},
{
"type": "remote",
"tag": "geoip-cn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
"download_detour": "direct"
},
{
"type": "remote",
"tag": "geoip-jp",
"format": "binary",
"url": "https://cdn.jsdelivr.net/gh/Loyalsoldier/geoip@release/srs/jp.srs",
"download_detour": "direct"
},
{
"type": "remote",
"tag": "geosite-abema",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-abema.srs",
"download_detour": "direct"
},
{
"type": "remote",
"tag": "geosite-dmm",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-dmm.srs",
"download_detour": "direct"
},
{
"type": "remote",
"tag": "geosite-dmm-porn",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-dmm-porn.srs",
"download_detour": "direct"
},
{
"type": "remote",
"tag": "ads",
"format": "binary",
"url": "https://raw.githubusercontent.com/DustinWin/ruleset_geodata/sing-box-ruleset/ads.srs",
"download_detour": "direct"
}
]
}
}