fix: run VLESS Reality on Xray instead of sing-box for v2rayN
sing-box Hy2 stays on 8443+; port 443 VLESS uses Xray which pairs reliably with v2rayN/Xray-core clients. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
# 已有 VPS:将 VLESS Reality 从 sing-box 迁移到 Xray(443)
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
|
||||
[[ $EUID -eq 0 ]] || { echo "请使用 root 运行"; exit 1; }
|
||||
|
||||
if ! command -v xray &>/dev/null; then
|
||||
echo "[+] 安装 Xray ..."
|
||||
bash -c "$(curl -fsSL https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install
|
||||
fi
|
||||
|
||||
export JIEDIAN_ROOT="$ROOT_DIR"
|
||||
|
||||
echo "[+] 更新 sing-box 配置(仅 Hysteria2)..."
|
||||
python3 "$ROOT_DIR/scripts/render-server.py"
|
||||
|
||||
echo "[+] 生成 Xray 配置(VLESS Reality 443)..."
|
||||
python3 "$ROOT_DIR/scripts/render-xray.py"
|
||||
|
||||
systemctl enable xray 2>/dev/null || true
|
||||
systemctl restart xray sing-box jiedian-panel
|
||||
|
||||
echo ""
|
||||
echo "[+] 迁移完成。请运行诊断:"
|
||||
bash "$ROOT_DIR/scripts/verify-reality.sh"
|
||||
echo ""
|
||||
echo "客户端无需改参数,直接测速 VLESS 节点即可。"
|
||||
Reference in New Issue
Block a user