Files
dekun 78b85c0d83 feat: enable HTTPS admin panel on port 443 for new deployments
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>
2026-06-28 00:46:08 +08:00

32 lines
952 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/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:// 链接导入。"