feat: frps-manager v1.0 - frp 0.70.1 multi-tenant web management system

- Multi-tenant client/proxy management with Flask+SQLite
- Frps server control (start/restart/token rotation)
- Generate frpc.ini with shared server token + admin API
- Dashboard API integration (live client/proxy status)
- RBAC: admin/tenant_admin/user roles
- Audit logging for all operations
- Systemd service files included
- Requires legacy INI format (frp 0.70 TOML auth broken)
This commit is contained in:
Your Name
2026-08-10 14:17:49 +08:00
commit 71214524f4
27 changed files with 2847 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# Example frpc systemd unit. Copy to /etc/systemd/system/frpc@.service on
# the frpc host, then:
# systemctl daemon-reload
# systemctl enable --now frpc@<client-name>.service
#
# The <instance> specifier lets you run multiple frpc instances per host.
# Place per-instance configs under /etc/frpc/<instance>.ini.
[Unit]
Description=frpc — fatedier/frp client (%i)
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/bin/frpc -c /etc/frpc/%i.ini
Restart=on-failure
RestartSec=5
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
+24
View File
@@ -0,0 +1,24 @@
[Unit]
Description=frps-manager — Flask web UI for managing frps
Documentation=https://github.com/fatedier/frp
After=network-online.target frps.service
Wants=network-online.target
[Service]
Type=simple
User=root
WorkingDirectory=/fs/1000/ftp/Project/frps-manager
Environment="FRPS_VHOST_HTTP_PORT=80"
Environment="FRPS_VHOST_HTTPS_PORT=443"
ExecStart=/fs/1000/ftp/Project/frps-manager/venv/bin/gunicorn \
--workers 2 \
--bind 0.0.0.0:5390 \
--access-logfile /fs/1000/ftp/Project/frps-manager/runtime/logs/web-access.log \
--error-logfile /fs/1000/ftp/Project/frps-manager/runtime/logs/web-error.log \
--timeout 60 \
wsgi:app
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
+29
View File
@@ -0,0 +1,29 @@
[Unit]
Description=frps — frp server managed by frps-manager
Documentation=https://github.com/fatedier/frp
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
# frps 0.70 does not support SIGHUP reload — `systemctl reload` will be
# turned into a full restart by systemd (ExecReload forces a fresh start).
ExecStart=/fs/1000/ftp/Project/frps-manager/runtime/bin/frps \
-c /fs/1000/ftp/Project/frps-manager/runtime/conf/frps.ini
# frps 0.70 doesn't implement SIGHUP reload — the manager invokes
# `systemctl restart frps.service` whenever a config change is applied.
ExecReload=/usr/bin/systemctl restart frps.service
Restart=on-failure
RestartSec=5
LimitNOFILE=65536
# Don't start before the web manager; if frps is down the web manager
# still works (it can reload / restart frps).
# Hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ProtectHome=true
[Install]
WantedBy=multi-user.target