Singbox内核自定义配置说明
V2bX在使用Singbox内核时,读取由OriginalPath
路径指定的自定义的配置文件,实现自定义DNS、路由、入口、出口功能。
远程获取的节点自动生成的inboundTag/outboundTag遵循:[ApiHost]-NodeType:NodeID的形式。如:[https://v2b.v-50.me/]-hysteria2:11。入/出站tag相同。
自定义配置文件示例
{
"dns": {
"servers": [
{
"tag": "cloudflare",
"address": "1.1.1.1",
"strategy": "prefer_ipv4"
}
]
},
"outbounds": [
{
"tag": "direct",
"type": "direct",
"domain_strategy": "prefer_ipv4"
},
{
"type": "block",
"tag": "block"
},
{
"type": "wireguard",
"tag": "warp",
"server": "engage.cloudflareclient.com",
"server_port": 2408,
"local_address": ["172.16.0.2/32"],
"private_key": "2DRzSLT1OBh+mN4fxZc+gu+hfYb8X4a9d0oD5NCb60Q=",
"peer_public_key": "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=",
"reserved": [45, 85, 21],
"mtu": 1380
}
],
"route": {
"rules": [
{
"ip_is_private": true,
"outbound": "block"
},
{
"rule_set": [
"geosite-google"
],
"outbound": "direct"
},
{
"rule_set": [
"geosite-category-ads-all"
],
"outbound": "block"
},
{
"rule_set": [
"geosite-cn",
"geoip-cn"
],
"outbound": "warp"
},
{
"domain_regex": [
"(api|ps|sv|offnavi|newvector|ulog.imap|newloc)(.map|).(baidu|n.shifen).com",
"(.+.|^)(360|so).(cn|com)",
"(Subject|HELO|SMTP)",
"(torrent|.torrent|peer_id=|info_hash|get_peers|find_node|BitTorrent|announce_peer|announce.php?passkey=)",
"(^.@)(guerrillamail|guerrillamailblock|sharklasers|grr|pokemail|spam4|bccto|chacuo|027168).(info|biz|com|de|net|org|me|la)",
"(.?)(xunlei|sandai|Thunder|XLLiveUD)(.)",
"(..||)(dafahao|mingjinglive|botanwang|minghui|dongtaiwang|falunaz|epochtimes|ntdtv|falundafa|falungong|wujieliulan|zhengjian).(org|com|net)",
"(ed2k|.torrent|peer_id=|announce|info_hash|get_peers|find_node|BitTorrent|announce_peer|announce.php?passkey=|magnet:|xunlei|sandai|Thunder|XLLiveUD|bt_key)",
"(.+.|^)(360).(cn|com|net)",
"(.*.||)(guanjia.qq.com|qqpcmgr|QQPCMGR)",
"(.*.||)(rising|kingsoft|duba|xindubawukong|jinshanduba).(com|net|org)",
"(.*.||)(netvigator|torproject).(com|cn|net|org)",
"(..||)(visa|mycard|gash|beanfun|bank).",
"(.*.||)(gov|12377|12315|talk.news.pts.org|creaders|zhuichaguoji|efcc.org|cyberpolice|aboluowang|tuidang|epochtimes|zhengjian|110.qq|mingjingnews|inmediahk|xinsheng|breakgfw|chengmingmag|jinpianwang|qi-gong|mhradio|edoors|renminbao|soundofhope|xizang-zhiye|bannedbook|ntdtv|12321|secretchina|dajiyuan|boxun|chinadigitaltimes|dwnews|huaglad|oneplusnews|epochweekly|cn.rfi).(cn|com|org|net|club|net|fr|tw|hk|eu|info|me)",
"(.*.||)(miaozhen|cnzz|talkingdata|umeng).(cn|com)",
"(.*.||)(mycard).(com|tw)",
"(.*.||)(gash).(com|tw)",
"(.bank.)",
"(.*.||)(pincong).(rocks)",
"(.*.||)(taobao).(com)",
"(.*.||)(laomoe|jiyou|ssss|lolicp|vv1234|0z|4321q|868123|ksweb|mm126).(com|cloud|fun|cn|gs|xyz|cc)",
"(flows|miaoko).(pages).(dev)"
],
"outbound": "block"
},
{
"outbound": "direct",
"network": [
"udp","tcp"
]
}
],
"rule_set": [
{
"tag": "geoip-cn",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs",
"download_detour": "direct"
},
{
"tag": "geosite-cn",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs",
"download_detour": "direct"
},
{
"tag": "geosite-category-ads-all",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-ads-all.srs",
"download_detour": "direct"
},
{
"tag": "geosite-google",
"type": "remote",
"format": "binary",
"url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google.srs",
"download_detour": "direct"
}
]
},
"experimental": {
"cache_file": {
"enabled": true
}
}
}
最后更新于