x-ui搭建vless+vision+tls

安装X-UI
bash <(curl -Ls https://raw.githubusercontent.com/FranzKafkaYu/x-ui/956bf85bbac978d56c0e319c5fac2d6db7df9564/install.sh) 0.3.4.4

搭建vision节点申请证书

#安装证书工具:
curl https://get.acme.sh | sh; apt install socat -y || yum install socat -y; ~/.acme.sh/acme.sh --set-default-ca --server letsencrypt

#三种方式任选其中一种,申请失败则更换方式
#申请证书方式1: 
~/.acme.sh/acme.sh  --issue -d 你的域名 --standalone -k ec-256 --force --insecure
#申请证书方式2: 
~/.acme.sh/acme.sh --register-account -m "${RANDOM}@chacuo.net" --server buypass --force --insecure && ~/.acme.sh/acme.sh  --issue -d 你的域名 --standalone -k ec-256 --force --insecure --server buypass
#申请证书方式3: 
~/.acme.sh/acme.sh --register-account -m "${RANDOM}@chacuo.net" --server zerossl --force --insecure && ~/.acme.sh/acme.sh  --issue -d 你的域名 --standalone -k ec-256 --force --insecure --server zerossl

#安装证书:
~/.acme.sh/acme.sh --install-cert -d 你的域名 --ecc --key-file /etc/x-ui/server.key --fullchain-file /etc/x-ui/server.crt

Reality寻找适合的目标网站
查询ASN:https://tools.ipip.net/as.php

寻找目标:https://fofa.info

asn==”25820″ && country==”US” && port==”443″ && cert!=”Let’s Encrypt” && cert.issuer!=”ZeroSSL” && status_code=”200″

检测端口是否被封
https://tcp.ping.pe/

x-ui面板实现多ip分流出站

  • xui是最简单的面板,估计没有之一
    通过xui实现多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": "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内容无需修改

outbound(出站)解析

"outbounds": [
    {
      "tag": "ip1",
      "sendThrough": "1.1.1.1",
      "protocol": "freedom",
      "settings": {}
    },
    {
      "tag": "ip2",
      "sendThrough": "1.1.1.2",
      "protocol": "freedom",
      "settings": {}
    },
    ...........
]

“tag”:定义此出站配置的标识,内容随意,自己分得清就行
“sendThrough”:定义出站ip
有多少个ip就添加多少个{….},注意{….}间用英文逗号隔开

routing(路由规则)解析

"routing": {
    "rules": [
      {
        "inboundTag": [
          "inbound-xxxxx","inbound-xxxxx"
        ],
        "outboundTag": "ip1",
        "type": "field"
      },
      {
        "inboundTag": [
          "inbound-xxxxx","inbound-xxxxx"
        ],
        "outboundTag": "ip2",
        "type": "field"
      },
      ................
]
  • “inboundTag”:入站配置的标识,每个入站列表中的节点都有相对应的inboundTag

xui对inboundTag的命名规则是inbound-节点端口号,比方说一个节点的端口是88888,那么这个节点的inboundTag就是inbound-88888
◆ “outboundTag”:对应出站配置的标识
这个路由规则的意思是说,将inboundtag-xxxxx所在的inbound节点与outbound ip连接。这样就可以实现ip1通过ip1出站,ip2通过ip2出站,或者ip1、ip2通过ip1出站,ip3、ip4通过ip2出站,可以随意组合
不想了解那么多也可以,直接将routing和outbound里的xx修改好,参照上面模板放在相应的位置,重启服务就好了