x-ui面板实现多ip分流出站
xui是最简单的面板,估计没有之一
通过xui实现多ip分流也很简单
创建好入站后直接修改面板设置里的xray配置模板就可以了
本文摘自:https://kev.fit/archives/43/
{
"api": {
"services": [
"HandlerService",
"LoggerService",
"StatsService"
],
"tag": "api"
},
"inbounds": [
{
"listen": "127.0.0.1",
"port": 62789,
"protocol": "dokodemo-door",
"settings": {
"address": "127.0.0.1"
},
"tag": "api"
}
],
"outbounds": [
{
"tag": "ip1",
"sendThrough": "1.1.1.1",
"protocol": "freedom",
"settings": {}
},
{
"tag": "ip2",
"sendThrough": "1.1.1.2",
"protocol": "freedom",
"settings": {}
},
{
"protocol": "freedom",
"settings": {}
},
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"policy": {
"system": {
"statsInboundDownlink": true,
"statsInboundUplink": true
}
},
"routing": {
"rules": [
{
"inboundTag": [
"inbound-xxxxx","inbound-xxxxx"
],
"outboundTag": "ip1",
"type": "field"
},
{
"inboundTag": [
"inbound-xxxxx","inbound-xxxxx"
],
"outboundTag": "ip2",
"type": "field"
},
{
"inboundTag": [
"api"
],
"outboundTag": "api",
"type": "field"
},
{
"ip": [
"geoip:private"
],
"outboundTag": "blocked",
"type": "field"
},
{
"outboundTag": "blocked",
"protocol": [
"bittorrent"
],
"type": "field"
}
]
},
"stats": {}
}
xray的通信原理是inbound-routing-outbound,也就是入站-路由规则-出站
入站节点内容存放在数据库内,不在模板中,数据库与模板共同组合成config.json
要实现多ip分流,主要是通过修改路由规则将入站列表中的节点与不同的出站ip进行连接
所以编辑routing和outbound即可,创建好节点后inbound内容无需修改