CQ-Accel API 文档

贴上 GitHub 链接,自动选最快线路并 302 直达下载。公开 · 不限速 · 定时更新节点。 ← 返回首页

1. 直接用(路径即原 GitHub 路径)

把 https://github.com/... 里的 github.com 换成站点域名即可。服务会实时选最优上游并返回 302 重定向,流量直连镜像站(不经过本机),支持 Range 断点续传:

# 下载 release 资源(curl 加 -L 跟随重定向)
curl -L -O "https://gh.somtfly.com/github.com/owner/repo/releases/download/v1.0/x.zip"

# raw / archive / codeload / gist 同理
curl -L -O "https://gh.somtfly.com/raw.githubusercontent.com/owner/repo/main/file.txt"

# 强制走本机中转(不重定向,便于排查):加 ?proxy=1
curl -L -O "https://gh.somtfly.com/github.com/owner/repo/releases/download/v1.0/x.zip?proxy=1"

# git clone(POST 无法重定向,自动走中转)
git clone https://gh.somtfly.com/github.com/owner/repo.git

2. 参数式

GET /fetch?u=<urlencode(github_url)>

3. 支持加速的内容

类型说明 / 示例
Release 附件github.com/owner/repo/releases/download/…(含 releases/latest/download/…)
源码包 archivegithub.com/owner/repo/archive/refs/heads|tags/….zip|tar.gz
codeloadcodeload.github.com/…(视上游而定)
raw 文件raw.githubusercontent.com/…、github.com/…/raw/…
gistgist.github.com / gist.githubusercontent.com
git clone / fetch / pullsmart HTTP(info/refs + POST git-upload-pack)
git ls-remote查看远程分支/标签
头像 / 静态资源avatars.githubusercontent.com、user-images / camo(视上游而定)
不提供:api.github.com(防开放代理滥用)。

4. 元数据 API

接口说明
/api/health服务存活
/api/upstreams上游池 + 健康(延迟/速度/可用)
/api/stats上游池统计汇总
/api/resolve?u=<url>解析可选线路列表
/api/best?u=<url>当前最优上游

5. 调试响应头

默认直接 302 到最优上游(Location 即镜像直链);加 ?proxy=1 走本机中转时,响应会带 X-Upstream: <上游名>,便于排查走的是哪条线路。

提示
仅允许 GitHub 域名;重定向有最终域名白名单校验;内容版权归原作者,本服务只做聚合中转。本服务对各镜像站仅做低频健康探测(轮询抽样 + 分层测速 + 每日流量预算),不做爬取或镜像。