GitHub 代理 · Cloudflare Pages

已部署成功 ✅

API 调用方法

所有 /api/... 请求会原样转发到 api.github.com,支持 GET / POST / PUT / DELETE 与自定义请求头。

场景命令
获取仓库信息(匿名)curl https://gh-proxy-page-bz0.pages.dev/api/repos/github/gitignore
带 Token 调用(推荐,避免限速)curl -H "Authorization: Bearer <TOKEN>" https://gh-proxy-page-bz0.pages.dev/api/user
获取发行版列表curl https://gh-proxy-page-bz0.pages.dev/api/repos/<owner>/<repo>/releases
创建 Issuecurl -X POST -H "Authorization: Bearer <TOKEN>" -d '{"title":"hi"}' https://gh-proxy-page-bz0.pages.dev/api/repos/<owner>/<repo>/issues
完整 URL 透传curl https://gh-proxy-page-bz0.pages.dev/https://api.github.com/repos/github/gitignore

前端跨域已开启 CORS,浏览器里直接 fetch 即可。

路由前缀速查

前缀转发到用途
/api/api.github.comGitHub API 全量
/raw/raw.githubusercontent.com原始文件
/gh/github.com网页
/objects/objects.githubusercontent.comRelease 大文件 / LFS
/codeload/codeload.github.comzip / tar 下载
/gist/gist.githubusercontent.comGist 文件
/avatars/avatars.githubusercontent.com头像
/uploads/uploads.github.comGist 上传