feat(traffic): add per-IP daily traffic tracking with 20GB limit for uploads and downloads

This commit is contained in:
OpenCode Bot
2026-05-01 09:02:39 +08:00
parent 3bdb417f10
commit f5727ec176
3 changed files with 90 additions and 4 deletions

View File

@@ -7,6 +7,8 @@ UPLOAD_FOLDER = os.path.join(BASE_DIR, 'uploads')
DATABASE = os.path.join(BASE_DIR, 'files.db')
MAX_CONTENT_LENGTH = 500 * 1024 * 1024
DAILY_TRAFFIC_LIMIT = 20 * 1024 * 1024 * 1024
EXPIRY_OPTIONS = {
'1h': 60 * 60,
'24h': 24 * 60 * 60,