A-A+
X-ui多IP搭建规则 多IP站群服务器实现源进源出分流
Xray相关设置,删除默认规则,用以下规则替换:
- {
- "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": "内网IP1",
- "protocol": "freedom",
- "settings": {}
- },
- {
- "tag": "ip2",
- "sendThrough": "内网IP2",
- "protocol": "freedom",
- "settings": {}
- },
- {
- "protocol": "freedom",
- "settings": {}
- },
- {
- "protocol": "blackhole",
- "settings": {},
- "tag": "blocked"
- }
- ],
- "policy": {
- "system": {
- "statsInboundDownlink": true,
- "statsInboundUplink": true
- }
- },
- "routing": {
- "rules": [
- {
- "inboundTag": [
- "inbound-端口","inbound-端口"
- ],
- "outboundTag": "ip1",
- "type": "field"
- },
- {
- "inboundTag": [
- "inbound-端口","inbound-端口"
- ],
- "outboundTag": "ip2",
- "type": "field"
- },
- {
- "inboundTag": [
- "api"
- ],
- "outboundTag": "api",
- "type": "field"
- },
- {
- "ip": [
- "geoip:private"
- ],
- "outboundTag": "blocked",
- "type": "field"
- },
- {
- "outboundTag": "blocked",
- "protocol": [
- "bittorrent"
- ],
- "type": "field"
- }
- ]
- },
- "stats": {}
- }