X-ui多IP搭建教程 多IP站群服务器实现源进源出分流

怎么搭建就不多说了,自己参考之前的文章:

X-UI和宝塔共存思路备份-清风博客
X-UI和宝塔共存思路备份-清风博客
清风的头像-清风博客VIP会员2023/7/16/ 14:33
0892102

然后在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和节点的端口即可。

温馨提示:本文最后更新于2024-04-23 00:28:02,某些文章具有时效性,若有错误或已失效,请在下方留言或联系清风#
© 版权声明
THE END
文章不错?点个赞呗!
点赞138 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容