协议:VLESS + REALITY
传输:TCP
端口:8443
服务端:Xray-core
运行方式:systemd
部署方式:直接安装,不使用 Docker / 面板
https://github.com/XTLS/Xray-install
sudo ash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install
xray version
systemctl status xray --no-pager
sudo cat /usr/local/etc/xray/config.json
为 VLESS + REALITY 准备服务端和客户端都需要的身份参数。
- UUID —— VLESS 用户身份
- REALITY X25519 密钥对 —— 服务端私钥 + 客户端公钥
- Short ID —— REALITY 的短 ID
- 目标站点/SNI —— REALITY 使用的目标域名
xray uuid
51dd06ac-930a-4c6e-941a-3352801c8681
xray x25519
PrivateKey: KNTugDwsJkDtWzyr3BGGhf0K8yrnzh9jAQBNOlAwp34
Password (PublicKey): pdz1sWhTRXQcYGuUFuePiJ1ZYTRY6ZN0VPGp92en8AY
Hash32: o2NfiofBzkNkpXh9e-SIw41W3ZxeJSXvmkO5Gmr7M2E
openssl rand -hex 8
402e6ddad7a9666c
| 参数 | 值 | 用途 |
|---|---|---|
| UUID | 51dd06ac-930a-4c6e-941a-3352801c8681 |
VLESS 用户身份 |
| REALITY PrivateKey | KNTugDwsJkDtWzyr3BGGhf0K8yrnzh9jAQBNOlAwp34 | 只放服务端 |
| REALITY PublicKey | pdz1sWhTRXQcYGuUFuePiJ1ZYTRY6ZN0VPGp92en8AY | 给客户端 |
| Short ID | 402e6ddad7a9666c |
REALITY 参数 |
REALITY Target/SNI:
www.microsoft.com
用途:
REALITY TLS 握手伪装目标。
/usr/local/etc/xray/config.json
{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"listen": "0.0.0.0",
"port": 8443,
"protocol": "vless",
"settings": {
"clients": [
{
"id": "51dd06ac-930a-4c6e-941a-3352801c8681",
"flow": "xtls-rprx-vision"
}
],
"decryption": "none"
},
"streamSettings": {
"network": "raw",
"security": "reality",
"realitySettings": {
"show": false,
"target": "www.cloudflare.com:443",
"dest": "www.cloudflare.com:443",
"xver": 0,
"serverNames": [
"www.cloudflare.com",
"cloudflare.com"
],
"privateKey": "KNTugDwsJkDtWzyr3BGGhf0K8yrnzh9jAQBNOlAwp34",
"shortIds": [
"402e6ddad7a9666c"
]
}
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls",
"quic"
]
}
}
],
"outbounds": [
{
"protocol": "freedom",
"tag": "direct"
},
{
"protocol": "blackhole",
"tag": "block"
}
]
}
测试配置: sudo xray run -test -config /usr/local/etc/xray/config.json
重启: sudo systemctl restart xray
查看状态: systemctl status xray --no-pager
查看端口:sudo ss -lntp | grep 8443
查看日志 sudo journalctl -u xray -f
sudo ufw allow 8443/tcp
sudo ss -lntp | grep 8443
需要确认 OCI 防火墙允许:
TCP 8443
来源:0.0.0.0/0
作用:
把服务端已有参数转换成 Clash Verge 可以导入的 VLESS 节点。
可以使用订阅模式
sub.yaml
proxies:
- name: "Oracle-Xray-Reality"
type: vless
server: xqd01.us.to
port: 8443
uuid: 51dd06ac-930a-4c6e-941a-3352801c8681
udp: true
tls: true
flow: xtls-rprx-vision
servername: www.cloudflare.com
network: tcp
reality-opts:
public-key: pdz1sWhTRXQcYGuUFuePiJ1ZYTRY6ZN0VPGp92en8AY
short-id: 402e6ddad7a9666c
client-fingerprint: ios
sudo timedatectl set-timezone Asia/Shanghai
handshake did not complete successfully
2026 自建节点实战:Xray VLESS-Vision-REALITY 部署指南 | 程序魔法笔记 | 饭饭Ani
记录一次基于 VLESS + REALITY 的梯子无法连接问题排查 丨 Suzuran's Blog
注意事项: