xui 多IP配置 教程

直接使用x-ui官方库:




bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)

然后在x-ui面板设置——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": {}
}把以上规则中的IP和端口改成你服务器的内网IP和节点的端口即可。


分享到:
下一篇
3x-ui 一键脚本
1
系统公告

美国洛杉矶Cn2/GIA线路回国专线独立物理服务器活动进行中

美国洛杉矶机房T1级数据中心,采用CN2/GIA回国专线直连线路,上百台独立物理服务器最快30分钟上线,点击了解更多配置
服务中心
客服
在线客服
24小时为您服务
咨询
联系我们
联系我们,为您的业务提供专属服务。
24/7 技术支持
如果您遇到寻求进一步的帮助,请过工单与我们进行联系。
24/7 即时支持
技术支持
售前客服
售前客服
售前客服
售后客服
评价
您对当前页面的整体感受是否满意?
😞
非常不满意
😕
不满意
😐
一般
🙂
满意
😊
非常满意