feat: add web admin panel for node management

Add Flask panel with login, add/delete nodes, and share link copy.
Generate sing-box config from SQLite; add uninstall script and clean install flow.
Panel served at https://DOMAIN:8444 via nginx.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-16 09:10:19 +08:00
parent e8631a0e10
commit bccf6cfdce
21 changed files with 1069 additions and 305 deletions
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# 卸载 jiediansing-box + 管理面板 + nginx 站点)
# 用法:sudo bash scripts/uninstall.sh
set -euo pipefail
[[ $EUID -eq 0 ]] || { echo "请使用 root 运行"; exit 1; }
echo "[*] 停止服务 ..."
systemctl stop jiedian-panel sing-box 2>/dev/null || true
systemctl disable jiedian-panel sing-box 2>/dev/null || true
echo "[*] 删除 systemd 单元 ..."
rm -f /etc/systemd/system/jiedian-panel.service
rm -f /etc/systemd/system/sing-box.service
systemctl daemon-reload
echo "[*] 删除 sing-box 配置 ..."
rm -rf /etc/sing-box
echo "[*] 删除 nginx 站点 ..."
rm -f /etc/nginx/sites-enabled/panel
rm -f /etc/nginx/sites-available/panel
rm -f /etc/nginx/sites-enabled/acme
rm -f /etc/nginx/sites-available/acme
rm -f /etc/nginx/sites-enabled/fallback
rm -f /etc/nginx/sites-available/fallback
nginx -t && systemctl reload nginx 2>/dev/null || true
echo "[*] 清理本地数据(保留 .env 与代码)..."
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
rm -rf "${ROOT}/data"
rm -rf "${ROOT}/panel/venv"
rm -rf "${ROOT}/client/generated"
echo ""
echo "卸载完成。重新安装:"
echo " cd ${ROOT}"
echo " bash scripts/generate-keys.sh # 可选,重置 Reality 密钥与面板密码"
echo " bash scripts/install.sh"