From 75ba11dce2fd5d6521a8860d3b71ebcea155e023 Mon Sep 17 00:00:00 2001 From: OpenCode Bot Date: Thu, 7 May 2026 23:24:35 +0800 Subject: [PATCH] docs(readme): update API URL to HTTPS domain, add deployment/SSL/traffic info --- README.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 32019d1..e52eb67 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,14 @@ python app.py - Web UI: http://localhost:5000 - API: see /api/upload and /api/file endpoints +Deployment + +The production instance runs at: +- **Domain**: `xiaji-temp.duckdns.org` +- **HTTPS**: Let's Encrypt SSL with auto-renewal (certbot timer) +- **Nginx**: reverse proxy with 500MB upload limit, 80→443 redirect +- **Gunicorn**: 4 workers, systemd-managed + Project layout - app.py # Flask application - config.py # Configuration constants @@ -57,6 +65,16 @@ Expiry and cleanup - A cleanup operation removes expired files from disk and deletes DB rows - Cleanup is invoked on access endpoints (and can be wired to a cron/daemon later) +Traffic limits +- Maximum file size: 500 MB +- Per-IP daily traffic limit: 20 GB (upload + download combined) +- IP traffic tracked in SQLite `ip_traffic` table, reset daily + +SSL certificate +- Let's Encrypt certificate deployed via certbot +- Auto-renewal via systemd timer: `certbot.timer` +- Manual renewal test: `certbot renew --dry-run` + Security notes - Do not commit secrets. Secrets should be provided via environment variables in production. - This repository currently avoids embedding credentials. @@ -76,7 +94,7 @@ Upload a file via the API endpoint: ```python import requests -BASE_URL = "http://23.226.133.121:5000" +BASE_URL = "https://xiaji-temp.duckdns.org" expiry = "24h" # 1h, 24h, 7d @@ -103,7 +121,7 @@ Response format: "filename": "file.zip", "filesize": 1048576, "expiry_hours": 24, - "share_url": "http://23.226.133.121:5000/file/550e8400..." + "share_url": "https://xiaji-temp.duckdns.org/file/550e8400..." } ``` @@ -122,10 +140,6 @@ Or use the bundled client script: python upload_client.py /path/to/file.zip 24h ``` -Limits -- Maximum file size: 500 MB -- Per-IP daily traffic limit: 20 GB (upload + download combined) - Contributing - Pull requests are welcome. Please follow the project style and ensure tests pass.