1. 前提条件:保证你的私服 VPS 上安装好了 x2ray 服务和 WARP 服务
2. 编辑 x2ray 配置文件 config.json, 增加配置项:
{
"routing": {
"rules": [
{
"type": "field",
"domain": [
"domain:imgur.com"
],
"outboundTag": "warp-outbound" // Assuming you have a WARP outbound tag
},
{
"type": "field",
"outboundTag": "direct" // Direct traffic not matching the above rule
}
]
},
"outbounds": [
{
"tag": "warp-outbound",
"protocol": "freedom", // Or your specific WARP protocol
"settings": {
"domainStrategy": "UseIP" // or other strategies
}
},
{
"tag": "direct",
"protocol": "freedom", // Direct access
"settings": {}
}
]
}
3. 重启 x2ray
4. 测试是否成功,点击链接