V2bX文档
  • 关于V2bX
  • V2bX下载和安装
    • 下载和安装
      • 使用一键脚本安装
      • 手动安装
  • V2bX配置文件说明
    • 配置文件说明
  • 功能说明
    • 限速功能说明
    • 设备连接限制功能说明
    • Singbox内核自定义配置说明
    • Xray内核自定义DNS说明
    • Xray内核自定义路由功能说明
    • Xray内核自定义入口功能说明
    • Xray内核自定义出口功能说明
    • 审计功能说明
    • 自动申请证书说明
由 GitBook 提供支持
在本页
  1. 功能说明

Xray内核自定义路由功能说明

上一页Xray内核自定义DNS说明下一页Xray内核自定义入口功能说明

最后更新于11个月前

V2bX完整支持全部的Xray-core所提供的自定义路由功能,具体启用方式如下:

  1. 编写 route.json文件,此配置与Xray 路由配置完全相同,请查看:获取帮助。

  2. 在config.yml中配置RouteConfigPath为route.json的路径。

  3. 如果要启用geoip相关配置,请确保geoip.dat和geosite.dat处于和config.yml同一目录。

远程获取的节点自动生成的inboundTag/outboundTag遵循:[ApiHost]-NodeType:NodeID的形式。如:[https://v2b.v-50.me]-shadowsocks:12。入/出站tag相同。

自定义路由功能示例

{
    "domainStrategy": "IPOnDemand",
    "rules": [
        {
            "type": "field",
            "outboundTag": "block",
            "ip": [
                "geoip:private"
            ]
        },
        {
            "type": "field",
            "outboundTag": "block",
            "protocol": [
                "bittorrent"
            ]
        },
        {
            "type": "field",
            "outboundTag": "IPv6_out",
            "domain": [
                "geosite:netflix"
            ]
        }
    ]
}
https://xtls.github.io/config/routing.html