快速开始
开源驿站 提供三类加速服务:GitHub 文件加速、Docker 镜像加速
与 软件源加速(pip / npm / Linux 发行版软件源)。
它们都是标准的 HTTP 反向代理,不需要安装任何客户端。
一分钟上手
1. GitHub 文件加速
把任意 GitHub 链接拼接到加速域名之后即可:
curl -LO "https://gh-proxy.cn/github/https://github.com/git/git/archive/refs/heads/master.tar.gz"
也可以在 GitHub 加速页面 中直接粘贴链接,页面会生成可复制的加速地址。
2. Docker 镜像加速
编辑 /etc/docker/daemon.json:
{
"registry-mirrors": ["https://gh-proxy.cn"]
}
然后重载配置并验证:
sudo systemctl daemon-reload
sudo systemctl restart docker
docker pull alpine:latest
3. 软件源加速(pip / npm / Linux 软件源)
一行命令换源,脚本会先备份原配置:
curl -fsSL https://gh-proxy.cn/scripts/pip.sh | sh
curl -fsSL https://gh-proxy.cn/scripts/npm.sh | sh
curl -fsSL https://gh-proxy.cn/scripts/apt.sh | sh -s -- --dry-run
详见 软件源加速总览。