快速上手总览
GH-Proxy 致力于为开发者解决访问 GitHub 时因网络波动导致的克隆慢、Release 资产下载超时等痛点。本服务完全免配置,支持多种快捷使用姿势。
1. 最简用法:前缀代理
只需在任何合法的 GitHub 资源 URL 前,拼接 https://gh-proxy.org/ 即可直接发起高速下载:
# 原链接
https://github.com/torvalds/linux/archive/refs/tags/v6.8.tar.gz
# 拼接加速前缀后
https://gh-proxy.org/https://github.com/torvalds/linux/archive/refs/tags/v6.8.tar.gz
2. Git Clone 仓库克隆加速
在执行 git clone 时,将原本的 GitHub 域名替换或直接拼接前缀:
# 推荐方式
git clone https://gh-proxy.org/https://github.com/username/repository.git
# 或者使用全局替换配置(参见 Git 客户端配置文档)
3. Raw 文件与一键安装脚本
在各类 Linux 安装脚本(如 Docker、Rustup、Node 安装器)中,通常需要 curl 远程脚本:
# 原脚本
curl -fsSL https://raw.githubusercontent.com/homebrew/install/HEAD/install.sh | bash
# 加速执行
curl -fsSL https://gh-proxy.org/https://raw.githubusercontent.com/homebrew/install/HEAD/install.sh | bash
4. 支持的资源类型
- GitHub Releases: 二进制安装包、Assets 文件。
- Git 仓库代码包: Zip / Tar.gz 归档。
- Raw 文件:
raw.githubusercontent.com及blob页面下的源文件。 - Gist: 公开 Gist 代码片段。
- Release 附件:
objects.githubusercontent.com附件无缝重定向支持。