API 文档
所有接口返回 JSON,字符集为 UTF-8。错误响应形如:
{"error": "rate limited", "code": "rate_limited"}
公开接口
GET /api/public/stats
{
"total_requests": 8192431,
"total_bytes": 13812487234560,
"today_requests": 24832,
"today_bytes": 414832123,
"today_uv": 19231,
"github_requests": 6123451,
"github_bytes": 13650000000000,
"docker_requests": 2068980,
"docker_bytes": 162487234560,
"updated_at": "2026-09-21T10:00:00Z"
}
GET /api/public/status
{"github": "ok", "docker": "ok", "database": "ok", "api": "ok", "docs": "ok"}
GET /api/site
站点公开信息(站名、描述、ICP、公告等)。
POST /api/github/convert
{"url": "https://github.com/git/git/archive/refs/heads/master.tar.gz"}
响应:
{
"ok": true,
"input": "https://github.com/...",
"output": "https://gh-proxy.cn/github/https://github.com/...",
"type": "archive",
"host": "github.com"
}
用户接口
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /api/user/profile | 当前用户资料 |
| GET | /api/user/tickets | 工单列表 |
| POST | /api/user/tickets | 创建工单 |
| GET | /api/user/notifications | 通知列表 |
除 /api/public/* 与 /api/github/convert 之外,
写操作都需要携带 X-CSRF-Token 头或 csrf_token 表单字段。
管理接口
管理接口只对本站管理员开放,不面向第三方提供服务,也不在此公开具体地址。
如需对接或申请,请提交工单联系我们。