cf-git-proxy

Cloudflare Workers 版 GitHub / git clone 加速 · v1.0.0

1. 克隆仓库

# 推荐写法(短路径,最稳)
git clone https://git.64832619.xyz/gh/octocat/Hello-World.git

# 兼容 gh-proxy 的完整 URL 写法
git clone https://git.64832619.xyz/https://github.com/octocat/Hello-World.git

2. 一次性配置:让所有 git 命令自动走代理

git config --global url."https://git.64832619.xyz/".insteadOf "https://github.com/"

# 取消:
git config --global --unset url."https://git.64832619.xyz/".insteadOf

配置后,直接 git clone https://github.com/owner/repo.git 就会自动加速。

3. URL 转换器

在上面的输入框粘贴链接…

支持的路径写法

https://git.64832619.xyz/gh/owner/repo.git              -> github.com/owner/repo.git
https://git.64832619.xyz/owner/repo.git                  -> github.com/owner/repo.git(裸简写)
https://git.64832619.xyz/github.com/owner/repo.git       -> 省略协议
https://git.64832619.xyz/https://github.com/owner/repo.git -> 完整 URL
https://git.64832619.xyz/raw/owner/repo/main/README.md   -> raw.githubusercontent.com
https://git.64832619.xyz/gist/user/id                    -> gist.github.com
https://git.64832619.xyz/api/repos/owner/repo            -> api.github.com
https://git.64832619.xyz/__health?check=1                 -> 自检(含上游连通性)

本服务默认只允许 GitHub 系域名(可在环境变量 ALLOW_HOSTS 中扩展)。 请勿用于登录 GitHub 网页端。