banner
oldcatY

oldcatY

中轻度LoveLive厨,主推莲团,二推水+虹团(缪团是神,星团……)
twitter
github
bilibili
steam

【科學上網】Vless_TCP_Reality搭建方式

1. 安裝 Xray#

bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install --beta

2. 下載配置#

VLESS-XTLS-uTLS-REALITY

curl -Lo /usr/local/etc/xray/config.json https://raw.githubusercontent.com/chika0801/Xray-examples/main/VLESS-XTLS-uTLS-REALITY/config_server.json

3. 啟動程式#

systemctl restart xray && sleep 0.2 && systemctl status xray

4. 配置示例#

服務端配置示例#

{
    "log": {
        "loglevel": "warning"
    },
    "routing": {
        "domainStrategy": "IPIfNonMatch",
        "rules": [
            {
                "type": "field",
                "ip": [
                    "geoip:cn"
                ],
                "outboundTag": "block"
            }
        ]
    },
    "inbounds": [
        {
            "listen": "0.0.0.0",
            "port": 443,
            "protocol": "vless",
            "settings": {
                "clients": [
                    {
                        "id": "chika", // 執行 xray uuid 生成,或 1-30 字節的字符串
                        "flow": "xtls-rprx-vision"
                    }
                ],
                "decryption": "none"
            },
            "streamSettings": {
                "network": "tcp",
                "security": "reality",
                "realitySettings": {
                    "show": false, // 若為 true,輸出調試信息
                    "dest": "itunes.apple.com:443", // 目標網站最低標準:國外網站,支持 TLSv1.3、X25519 與 H2,域名非跳轉用(主域名可能被用於跳轉到 www)
                    "xver": 0,
                    "serverNames": [ // 客戶端可用的 serverName 列表,暫不支持 * 通配符
                        "itunes.apple.com", // 執行 xray tls ping www.lovelive-anime.jp,顯示 Pinging with SNI, handshake succeeded, Allowed domains:***,填 Allowed domains 的值
                    ],
                    "privateKey": "2KZ4uouMKgI8nR-LDJNP1_MHisCJOmKGj9jUjZLncVU", // 執行 xray x25519 生成,填 "Private key" 的值
                    "shortIds": [ // 客戶端可用的 shortId 列表,可用於區分不同的客戶端
                        "", // 若有此項,客戶端 shortId 可為空
                        "a1", // 0 到 f,長度為 2 的倍數,長度上限為 16,或執行 openssl rand -hex 8 生成
                        "bc19",
                        "b2da06",
                        "2d940fe6",
                        "b85e293fa1",
                        "4a9f72b5c803",
                        "19f70b462cea5d",
                        "6ba85179e30d4fc2"
                    ]
                }
            },
            "sniffing": {
                "enabled": true,
                "destOverride": [
                    "http",
                    "tls"
                ]
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "freedom",
            "tag": "direct"
        },
        {
            "protocol": "blackhole",
            "tag": "block"
        }
    ],
    "policy": {
        "levels": {
            "0": {
                "handshake": 2,
                "connIdle": 120
            }
        }
    }
}

客戶端配置示例(以 Clash.Meta 為例)#

- {name: VLess.XTLS.uTLS.Reality, server: server_ip or domain, port: 443, type: vless, uuid: same as above, tls: true, udp: true, flow: xtls-rprx-vision, servername: itunes.apple.com, reality-opts: {public-key: YyZo1wIsp71MAi-wyrCfQjYF72Rbs5CdDPtsD1OhBnM}, client-fingerprint: chrome}

public-key 填寫上面執行過 xray x255519 後生成的 “Public Key” 值;client-fingerprint 可填:chromefirefoxsafarirandom

載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。