Skip to content
This repository was archived by the owner on Apr 26, 2026. It is now read-only.
This repository was archived by the owner on Apr 26, 2026. It is now read-only.

【分享】现在CF的IP被屏蔽了,没办法白嫖了,我写了一个可以VPS部署的版本,分享给大家 #139

@xiaoshouchen

Description

@xiaoshouchen

github 地址

https://github.com/xiaoshouchen/docker-proxy

功能

  • 透明代理 Docker Hub(registry-1.docker.io)的所有 Registry V2 API 请求
  • 内部自动处理 auth.docker.io 鉴权,Docker 客户端无需配置认证
  • Token 缓存,避免重复请求 auth.docker.io
  • 官方镜像自动补全 library/ 前缀
  • Blob 下载 CDN 重定向自动跟随(支持多跳)
  • 支持多上游仓库路由(quay.io、gcr.io、ghcr.io、registry.k8s.io 等)
  • 浏览器访问时展示 Docker Hub 镜像搜索页面
  • 爬虫 UA 屏蔽 + nginx 伪装页
  • /health 健康检查端点,诊断到上游的连通性
  • 支持 TLS(HTTPS)
  • 支持后台守护进程模式运行
  • 单文件编译,无外部依赖,静态链接

部署

将编译好的二进制上传到海外服务器:

chmod +x docker-proxy-linux-amd64

# 前台运行(调试用)
./docker-proxy-linux-amd64 -addr :5000

# 后台运行
./docker-proxy-linux-amd64 -d -addr :5000

# 停止
kill $(cat docker-proxy.pid)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions