mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +08:00
ad9b336fb9
- Replace tunnel_quota table with user_quota table - Add user-level daily/monthly quota tracking and enforcement - Update user CRUD to include quota configuration - Migrate backup/restore to use user quota fields - Update frontend API and UI for user quota management
1014 B
1014 B
User Traffic Quota (Fix PR #308 Semantics)
- Confirm new quota semantics: daily/monthly quota applies per user (aggregated across all tunnels), not per tunnel; overage pauses only that user's active forwards and blocks create/resume.
- Backend schema: replace
tunnel_quotausage with newuser_quotapersistence model + view types. - Repository: implement user quota read/write/increment/reset + daily/monthly window rollover.
- Handler: wire quota accumulation into flow uploads, enforce overage (pause forwards + mark quota-disabled), and add admin reset API.
- Jobs: run daily quota window rollover + release logic in existing 00:05 maintenance job.
- Backup/import: persist quota config + quota-disable metadata on user backup payloads (not rolling usage).
- Tests: update contract + handler job tests to validate quota blocking + reset window rollover.
- Frontend: move quota inputs/usage/reset UI from tunnel management to user management; update API/types accordingly.