Xray 让不同 UUID 的用户走不同的路由 routing - user 篇
需求
参考
https://xtls.github.io/config/inbounds/vless.html#clientobject
思路
对
对
routing
实践
以你已经搭好了一个正常使用的梯子 为前提.
编辑你的
* 推荐使用
* 推荐用 notepad3 替换系统记事本. 对
添加一个用户, 给你的朋友使用, 设置 email 属性
注意看
然后给复制出来的
你可以通过
给新添加的用户设置
如果你的一键脚本本身就有
"email": "user2@x.com"
同样的, 因为
cat /usr/local/etc/xray/config.json
/usr/local/bin/xray run -config /usr/local/etc/xray/config.json -test
* 如果你不是用官方脚本安装的, xray
重启
service xray restart
设置 warp 的 outbound 的 tag
以
bash <(curl -fsSL git.io/warp.sh) s5
那么可以设置一个
{"protocol": "socks","settings": {"servers": [{"address": "127.0.0.1","port": 40000 //warp socks5 port}]},"tag": "socks5-warp"},
整个
routing 中设置根据 user 的路由策略
{"type": "field","user": ["user2@x.com"], // 这里写某个client 的 "outboundTag": "socks5-warp" // 这里写outbound 的 tag },
这样就可以简单地把某个
改完像这个样子
测试配置文件格式正确
/usr/local/bin/xray run -config /usr/local/etc/xray/config.json -test
* 如果你不是用官方脚本安装的, xray
service xray restart
测试
将
评论
发表评论