xrayr 文档
  • 关于XrayR
  • XrayR下载和安装
    • 下载和安装
      • 使用一键脚本安装
      • 使用docker安装
      • 手动安装
  • XrayR配置文件说明
    • 配置文件说明
  • 对接SSpanel
    • 基本对接配置
      • 对接新版SSPanel Custom Config
      • 对接V2ray
      • 对接Trojan
      • 对接Shadowsocks
      • 对接Shadowsocks - V2Ray-Plugin
  • 对接V2board
    • 基本对接配置
  • 对接PMPanel
    • 基本对接配置
  • 对接ProxyPanel
    • 基本对接配置
  • 功能说明
    • 限速功能说明
    • 设备连接限制功能说明
    • 自定义DNS说明
    • 自定义路由功能说明
    • 自定义入口功能说明
    • 自定义出口功能说明
    • 审计功能说明
    • 自动申请证书说明
    • Fallback 功能说明
  • 杂项
    • 内存优化相关
    • 为什么要引入Shadowsocks - V2Ray-Plugin
    • Nginx+Trojan暂时滴神!
Powered by GitBook
On this page
  1. 功能说明

自定义路由功能说明

Previous自定义DNS说明Next自定义入口功能说明

Last updated 3 years ago

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

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

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

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

远程获取的节点自动生成的inboundTag/outboundTag遵循:NodeType_Base64(ListenIP)_Port的形式。如:V2ray_MTI3LjAuMC4x_80。入/出站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