refactor: remove VLESS/Xray, Hy2-only stack
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
# 已有 VPS:停用 Xray/VLESS,仅保留 Hysteria2
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
|
||||
[[ $EUID -eq 0 ]] || { echo "请使用 root 运行: sudo bash scripts/remove-vless.sh"; exit 1; }
|
||||
|
||||
export JIEDIAN_ROOT="$ROOT"
|
||||
|
||||
echo "[1/4] 停止并禁用 Xray ..."
|
||||
systemctl stop xray 2>/dev/null || true
|
||||
systemctl disable xray 2>/dev/null || true
|
||||
|
||||
echo "[2/4] 更新代码并重载 sing-box 配置 ..."
|
||||
if [[ -d "$ROOT/.git" ]]; then
|
||||
git -C "$ROOT" pull --ff-only || echo "(git pull 跳过,请手动同步)"
|
||||
fi
|
||||
python3 "$ROOT/scripts/render-server.py"
|
||||
|
||||
echo "[3/4] 重启服务 ..."
|
||||
systemctl restart sing-box jiedian-panel
|
||||
|
||||
echo "[4/4] 可选:关闭防火墙 443(若不再需要) ..."
|
||||
ufw delete allow 443/tcp 2>/dev/null || true
|
||||
|
||||
echo ""
|
||||
echo "完成。VLESS 已停用,面板仅显示 Hysteria2 链接。"
|
||||
echo "客户端请删除旧 VLESS 节点,从面板复制 hy2:// 链接导入。"
|
||||
Reference in New Issue
Block a user