78b85c0d83
Add Nginx SSL panel config, enable-panel-https.sh, secure Flask cookies, and update docs for https login. Co-authored-by: Cursor <cursoragent@cursor.com>
32 lines
952 B
Bash
32 lines
952 B
Bash
#!/usr/bin/env bash
|
||
# 已有 VPS:停用 Xray/VLESS,并启用 HTTPS 管理面板
|
||
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/5] 停止并禁用 Xray ..."
|
||
systemctl stop xray 2>/dev/null || true
|
||
systemctl disable xray 2>/dev/null || true
|
||
|
||
echo "[2/5] 更新代码 ..."
|
||
if [[ -d "$ROOT/.git" ]]; then
|
||
git -C "$ROOT" pull --ff-only || echo "(git pull 跳过,请手动同步)"
|
||
fi
|
||
|
||
echo "[3/5] 重载 sing-box 配置 ..."
|
||
python3 "$ROOT/scripts/render-server.py"
|
||
|
||
echo "[4/5] 启用 HTTPS 管理面板 ..."
|
||
bash "$ROOT/scripts/enable-panel-https.sh"
|
||
|
||
echo "[5/5] 重启服务 ..."
|
||
systemctl restart sing-box jiedian-panel
|
||
|
||
echo ""
|
||
echo "完成。VLESS 已停用,面板请用 HTTPS 访问。"
|
||
echo "客户端请删除旧 VLESS 节点,从面板复制 hy2:// 链接导入。"
|