📖 后端接入地址
Base URL: http://185.242.232.24/api
┌─ App 端(用户卡密登录)────────────────────────┐
│ POST /api/auth/login {"card":"VIP…","device":"…"} → token │
│ GET /api/auth/check Header: Authorization: Bearer token │
└──────────────────────────────────────────────┘
┌─ 管理端(本平台使用)──────────────────────────┐
│ POST /api/auth/card/create {"count":5,"days":30} 生成卡密 │
│ GET /api/auth/cards 列表 │
│ POST /api/auth/card/ban {"card":"VIP…","ban":true} 封禁 │
└──────────────────────────────────────────────┘
┌─ 文件与下载(App 登录后可用)───────────────────┐
│ GET /api/file/list?scope=downloads 文件列表 │
│ POST /api/file/upload?filename=x.zip 上传(流式≤5GB) │
│ GET /api/file/download/downloads/x.zip 下载(断点续传) │
│ POST /api/file/share {"name":"x.zip"} → 公网外链 │
└──────────────────────────────────────────────┘
🐍 Python 接入示例
import requests
BASE = "http://185.242.232.24/api"
# ① 用户端: 卡密登录
r = requests.post(f"{BASE}/auth/login",
json={"card": "VIPE2EDEF7277DC",
"device": "user-device-uuid"}).json()
token = r["token"]
H = {"Authorization": f"Bearer {token}"}
# ② 校验登录态
print(requests.get(f"{BASE}/auth/check", headers=H).json())
# → {'valid': True, 'card': 'VIP…', 'expire': 1796939572, ...}
# ③ 上传文件(≤5GB)
requests.post(f"{BASE}/file/upload?filename=data.zip",
headers=H, data=open("data.zip", "rb"))
# ④ 生成公网下载外链
link = requests.post(f"{BASE}/file/share",
headers=H, json={"name": "data.zip"}).json()
print(link["share_url"])
# ⑤ 管理端: 批量生成卡密
r = requests.post(f"{BASE}/auth/card/create",
headers={"X-Panel-Token": "panel-2026"},
json={"count": 10, "days": 90, "note": "内测渠道"})
print(r.json()["created"])