Flappy CDN Dashboard - web management and monitoring for the CDN server
- Python 84.1%
- Shell 14.8%
- Vim Snippet 1.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| docs | ||
| scripts | ||
| .gitignore | ||
| cdn-dashboard.env.example | ||
| cdn-dashboard.service | ||
| install.sh | ||
| LICENSE | ||
| README.md | ||
| server.py | ||
Flappy CDN · live dashboard
LAN-only monitor for Flappy Launcher package downloads
nginx access log + live TCP · zero npm/Node deps · one install.sh
Example snapshot from a real CDN host: active streams through NPM, completed .7z pulls, per-client volume.
What you see
| Panel | Meaning |
|---|---|
| Active streams | Open TCP connections to the CDN port right now |
| Active clients | Distinct peers (after real_ip / X-Forwarded-For: real players, not only the proxy) |
| Throughput / volume (1 min) | From completed access-log lines |
| Re-Dovah / Flappy / both · all time | Bytes actually sent ($bytes_sent), split by URL prefix. Re-Dovah = CDN root packages/ + index.json. Flappy = /flappy/. Totals survive logrotate via /var/lib/cdn-dashboard/lifetime.json. |
| Current versions | launcher/version.json, root index.json / version.txt, flappy/index.json |
| Download launcher | Serves /var/www/cdn.flappy.su/launcher/Flappy-Launcher.zip |
| Live connections | Per-socket speed via ss (bytes_acked deltas) |
| Clients last 60s | Who finished transfers recently |
| Recent completed requests | Path, size, status, optional speed, UA (launcher pill) |
| Per-IP download cap | Live adjustment of Nginx rate limit (limit_rate) & connection cap (limit_conn) |
| Launcher Remote Config | Web management for launcher-config.json: Maintenance Mode, Banner MOTD, Catalog visibility toggles |
| Server & Builder Ops | 1-click execution for builder scripts (clear_garbage.sh, status.sh, reload Nginx) with live terminal log |
File names appear when a request finishes (nginx access log). Live speed for in-flight transfers comes from TCP counters.
Architecture
Players ──HTTPS──► NPM / reverse proxy ──HTTP──► CDN nginx :8080
│
access.log ────────────────┤
TCP :8080 (ss) ────────────┤
▼
dashboard :8090 (LAN only)
Works with the Flappy Launcher layout (index.json, packages/**/*.7z), or any static nginx CDN.
Install (on the CDN container / LXC)
git clone https://github.com/PinyaGit/flappy-cdn-dashboard.git
cd flappy-cdn-dashboard
sudo ./install.sh \
--with-nginx \
--proxy-ip 192.168.1.226 \
--access-log /var/log/nginx/cdn.flappy.su.access.log \
--nginx-port 8080 \
--port 8090
Then open from a PC on your LAN:
http://<cdn-host-ip>:8090/
| Flag | Purpose |
|---|---|
--with-nginx |
Add log_format cdn_timed ($request_time), wire access_log … cdn_timed |
--proxy-ip |
set_real_ip_from for NPM (so logs/UI show real client IPs) |
--access-log |
Path to nginx access log |
--nginx-port |
CDN listen port used by live ss |
--allow |
Who may open the UI (default: 192.168.,10.,127.0.0.1,::1) |
--uninstall |
Remove unit + /opt/cdn-dashboard |
After install
| Path | |
|---|---|
| UI | http://<host>:8090/ |
| Endpoints | /api/live · /api/versions · /api/launcher-config · /api/rate-limit · /api/action-run · /api/action-status · /health |
| App | /opt/cdn-dashboard/server.py |
| Env | /etc/default/cdn-dashboard |
| Unit | cdn-dashboard.service |
systemctl status cdn-dashboard
journalctl -u cdn-dashboard -f
curl -s http://127.0.0.1:8090/api/launcher-config
NPM (reverse proxy) tips
For large launcher packages (.7z + Range):
- Disable Response Buffering → ON
- Disable Request Buffering → ON
- Pass X-Forwarded-For / X-Real-IP (needed for real client IPs on the dashboard)
- Long proxy timeouts (
proxy_read_timeout/proxy_send_timeout≥ 3600s) - Do not cache huge package assets
Without (1), a second downloader often sits at 0% while the first transfer buffers through NPM.
Security
- Requests from outside
CDN_DASH_ALLOWget 403 (LAN-oriented by default). - No public domain required — bind IP + port is enough.
- Runs as root on a dedicated CDN LXC so it can read
/var/log/nginxand runss.
Repo layout
flappy-cdn-dashboard/
├── install.sh # one-shot installer
├── server.py # dashboard (Python 3 stdlib only)
├── cdn-dashboard.service # systemd unit
├── cdn-dashboard.env.example
├── docs/
│ └── dashboard-preview.png # README screenshot (example state)
├── scripts/
│ └── nginx-cdn-timed.conf.snippet
├── README.md
└── LICENSE
Uninstall
sudo ./install.sh --uninstall
Changelog
v1.2
- Launcher Remote Config: dynamic
launcher-config.jsoneditor with Maintenance Mode switch, Banner announcement editor, and per-game catalog access gates. - Server Actions Runner: trigger and stream logs for
clear_garbage.sh,status.sh, and Nginx reload directly in the Web UI. - Per-IP Rate Limiting: on-the-fly tuning of Nginx client download caps (
limit_rateandlimit_conn).
License
MIT — see LICENSE.
Related: flappy-launcher