XrayR-doc/gong-neng-shuo-ming/zi-ding-yi-lu-you-gong-neng-shuo-ming.md
2022-04-27 14:21:41 +10:00

44 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 自定义路由功能说明
XrayR完整支持全部的Xray-core所提供的自定义路由功能具体启用方式如下
1. 编写 route.json文件此配置与Xray 路由配置完全相同,请查看:[https://xtls.github.io/config/routing.html](https://xtls.github.io/config/routing.html)获取帮助。
2.`config.yml`中配置`RouteConfigPath`为route.json的路径。
3. 如果要启用geoip相关配置请确保`geoip.dat``geosite.dat`处于和`config.yml`同一目录。
{% hint style="info" %}
远程获取的节点自动生成的inboundTag/outboundTag遵循`NodeType_ListenIP_Port`的形式。如:`V2ray_0.0.0.0_80`。入/出站tag相同。
{% endhint %}
### 自定义路由功能示例
```text
{
"domainStrategy": "IPOnDemand",
"rules": [
{
"type": "field",
"outboundTag": "block",
"ip": [
"geoip:private"
]
},
{
"type": "field",
"outboundTag": "block",
"protocol": [
"bittorrent"
]
},
{
"type": "field",
"outboundTag": "IPv6_out",
"domain": [
"geosite:netflix"
]
}
]
}
```