GitHub · Docker Hub · GCR · GHCR · jsDelivr 一站式加速代理

加速 GitHub 资源下载、Docker Hub / gcr.io / ghcr.io 镜像拉取

快速开始

GitHub 加速

代理 github.com、raw.githubusercontent.com、githubusercontent.com 等域名下的 Release、源码、Raw 文件下载,支持 git clone 加速。

github.com

Docker Hub 加速

兼容 Docker Registry v2 协议,可作为 docker pull 镜像加速器

registry-1.docker.io

gcr.io 加速

代理 Google Container Registry (gcr.io) 镜像拉取,通过 gcr 路径前缀加速,支持 k8s-staging、etcd-development 等仓库镜像。

gcr.io

ghcr.io 加速

代理 GitHub Container Registry (ghcr.io) 镜像拉取,通过 ghcr 路径前缀加速,支持 GitHub 用户/组织发布的容器镜像。

ghcr.io

jsDelivr CDN 加速

代理 cdn.jsdelivr.net 静态资源,通过 /jsdelivr 路径前缀加速 npm、GitHub 仓库、WordPress 等前端资源。

cdn.jsdelivr.net

使用方法

1

GitHub 资源加速

在原始 GitHub 地址前加上本服务地址即可,支持 Release、源码包、Raw 文件、git clone 等场景。

# 1) 直接下载 release 文件
https://your-server:8080/https://github.com/user/repo/releases/download/v1.0/file.zip

# 2) git clone 加速
git clone https://your-server:8080/https://github.com/user/repo.git

# 3) raw.githubusercontent.com 文件
https://your-server:8080/https://raw.githubusercontent.com/user/repo/main/README.md
2

Docker Hub 镜像加速

在 Docker daemon 配置中添加本服务为镜像加速器,重启 Docker 后即可正常 docker pull,自动通过代理加速。

# 1) 编辑 /etc/docker/daemon.json
{
  "registry-mirrors": ["https://your-server:8080"]
}

# 2) 重启 Docker
systemctl restart docker

# 3) 正常拉取镜像(自动通过代理加速)
docker pull nginx:latest
docker pull library/alpine:3.18
3

gcr.io 镜像加速

gcr.io 镜像通过 gcr 路径前缀加速,直接以完整路径拉取即可,无需修改 daemon 配置。

# 拉取 gcr.io 镜像(路径前缀 gcr)
docker pull your-server:8080/gcr/k8s-staging-cluster-api/clusterctl:latest

# 拉取 etcd 镜像
docker pull your-server:8080/gcr/etcd-development/etcd:v3.5.10
4

ghcr.io 镜像加速

ghcr.io(GitHub Container Registry)镜像通过 ghcr 路径前缀加速,直接以完整路径拉取即可,无需修改 daemon 配置。

# 拉取 ghcr.io 镜像(路径前缀 ghcr)
docker pull your-server:8080/ghcr/user/image:latest

# 拉取 GitHub Actions 缓存镜像
docker pull your-server:8080/ghcr/actions/cache:latest
5

jsDelivr CDN 加速

将 cdn.jsdelivr.net 资源地址替换为 /jsdelivr 路径前缀即可,支持 npm 包、GitHub 仓库、WordPress 插件等静态资源。

# 1) npm 包资源
https://your-server:8080/jsdelivr/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css

# 2) GitHub 仓库资源(gh/owner/repo@version/path)
https://your-server:8080/jsdelivr/gh/twbs/bootstrap@v5.1.3/dist/js/bootstrap.bundle.min.js

# 3) combine 组合多个文件
https://your-server:8080/jsdelivr/combine/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css,npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js