🪐 GitHub 镜像代理

基于 Cloudflare Workers  ·  支持 git clone / push · API · Raw · Release 下载

🔗 地址转换

无法识别的 GitHub 地址,请输入 github.com 相关 URL。

⚙️ 配置 Git 全局走镜像

1

执行以下命令,所有 github.com 的 git 操作自动走镜像,无需修改任何仓库配置:

git config --global url."https://gh.lihongjie.cn/".insteadOf "https://github.com/"

配置后 git clone https://github.com/user/repo.git 会自动重定向到镜像站。

2

验证配置是否生效:

git config --global --get-regexp url

如需撤销,执行:

git config --global --unset url."https://gh.lihongjie.cn/".insteadOf

📡 代理路由

代理路径目标域名用途
/api/*api.github.comGitHub REST API
/raw/*raw.githubusercontent.comRaw 文件
/objects/*objects.githubusercontent.comRelease 二进制 (R2 缓存)
/codeload/*codeload.github.comzip / tar.gz 归档
/*github.comgit clone/push · releases