mirror of
https://github.com/sky22333/hubproxy.git
synced 2026-08-05 03:24:57 +08:00
update docs
This commit is contained in:
@@ -32,11 +32,7 @@ description: 公网部署 HubProxy 的推荐拓扑与安全要求。
|
||||
| Docker 内 Caddy + HubProxy | ✅ | ✅ | ⭐⭐⭐ |
|
||||
| 本机 Nginx → HubProxy | ✅ | ✅ | ⭐⭐⭐ |
|
||||
| Cloudflare 直连 HubProxy | ❌ 共用 CDN IP | ✅ | ⚠️ |
|
||||
| 公网直连 `0.0.0.0:5000` | ✅ | ✅ | ⚠️ 开放代理风险 |
|
||||
|
||||
## HTTP/3(QUIC)
|
||||
|
||||
Caddy 默认开启 HTTP/3 只影响「用户 → Caddy」段(UDP)。Caddy 回源 HubProxy 仍使用 TCP,当前 IP 信任机制无需额外配置。
|
||||
| 公网直连 `0.0.0.0:5000` | ✅ | ✅ | ⚠️ 容易被滥用 |
|
||||
|
||||
## 下一步
|
||||
|
||||
|
||||
@@ -32,11 +32,7 @@ Users → CDN (optional) → Caddy/Nginx (private/local) → HubProxy:5000
|
||||
| Docker Caddy + HubProxy | ✅ | ✅ | ⭐⭐⭐ |
|
||||
| Local Nginx → HubProxy | ✅ | ✅ | ⭐⭐⭐ |
|
||||
| Cloudflare direct to HubProxy | ❌ shared CDN IP | ✅ | ⚠️ |
|
||||
| Public `0.0.0.0:5000` | ✅ | ✅ | ⚠️ open proxy risk |
|
||||
|
||||
## HTTP/3 (QUIC)
|
||||
|
||||
Caddy's HTTP/3 only affects the user → Caddy segment (UDP). Caddy still uses TCP to reach HubProxy — no extra IP trust configuration needed.
|
||||
| Public `0.0.0.0:5000` | ✅ | ✅ | ⚠️ easily abused |
|
||||
|
||||
## Next Steps
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@ enabled = true
|
||||
## Pull Path Format
|
||||
|
||||
```bash
|
||||
# Docker Hub (no registry prefix needed)
|
||||
docker pull example.com/library/nginx:latest
|
||||
# Docker Hub (no registry prefix; library and latest added automatically for official images)
|
||||
docker pull example.com/nginx
|
||||
|
||||
# Third-party registry
|
||||
docker pull example.com/ghcr.io/owner/image:tag
|
||||
|
||||
@@ -36,13 +36,18 @@ Extend or disable in `[registries]` — see [Registry Sources](/en/guides/docker
|
||||
## Pull Examples
|
||||
|
||||
```bash
|
||||
# Docker Hub
|
||||
docker pull example.com/library/nginx:latest
|
||||
# Docker Hub official image (no library prefix needed)
|
||||
docker pull example.com/nginx
|
||||
|
||||
# Docker Hub user image
|
||||
docker pull example.com/user/app:tag
|
||||
|
||||
# Third-party registry (path includes registry domain)
|
||||
docker pull example.com/ghcr.io/owner/image:tag
|
||||
```
|
||||
|
||||
The `library/` namespace is added automatically for official images, and `latest` is used when no tag is given — `example.com/nginx` is equivalent to `example.com/library/nginx:latest`.
|
||||
|
||||
## Image Search
|
||||
|
||||
The web UI (`enableFrontend = true`) provides Docker Hub search and tag browsing. API access:
|
||||
|
||||
@@ -9,7 +9,7 @@ Downloads use a **two-step flow**: `prepare` for a one-time token, then download
|
||||
|
||||
## Web UI
|
||||
|
||||
Visit the HubProxy homepage and use the offline image feature.
|
||||
Visit the HubProxy homepage and use the offline image feature. When selecting an architecture, if the image does not provide the selected architecture or the input is invalid, it automatically falls back to `linux/amd64`.
|
||||
|
||||
## Single Image API
|
||||
|
||||
@@ -37,7 +37,7 @@ Optional parameters:
|
||||
|
||||
| Param | Description |
|
||||
|-------|-------------|
|
||||
| `platform` | Target platform, e.g. `linux/amd64` |
|
||||
| `platform` | Target platform, e.g. `linux/arm64`; falls back to `linux/amd64` if unmatched or invalid |
|
||||
| `tag` | Used when image has no tag, default `latest` |
|
||||
| `compressed` | Compress layers, default `true` |
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@ enabled = true
|
||||
## 拉取路径格式
|
||||
|
||||
```bash
|
||||
# Docker Hub(无需前缀 registry 域名)
|
||||
docker pull example.com/library/nginx:latest
|
||||
# Docker Hub(无需前缀 registry 域名,官方镜像自动补齐 library 与 latest)
|
||||
docker pull example.com/nginx
|
||||
|
||||
# 第三方 Registry
|
||||
docker pull example.com/ghcr.io/owner/image:tag
|
||||
|
||||
@@ -36,13 +36,18 @@ sudo systemctl restart docker
|
||||
## 拉取示例
|
||||
|
||||
```bash
|
||||
# Docker Hub
|
||||
docker pull example.com/library/nginx:latest
|
||||
# Docker Hub 官方镜像(无需写 library 前缀)
|
||||
docker pull example.com/nginx
|
||||
|
||||
# Docker Hub 用户镜像
|
||||
docker pull example.com/user/app:tag
|
||||
|
||||
# 第三方 Registry(路径含 registry 域名)
|
||||
docker pull example.com/ghcr.io/owner/image:tag
|
||||
```
|
||||
|
||||
官方镜像会自动补齐 `library/` 命名空间,未指定标签时自动使用 `latest`,即 `example.com/nginx` 等价于 `example.com/library/nginx:latest`。
|
||||
|
||||
## 镜像搜索
|
||||
|
||||
Web 界面(`enableFrontend = true`)提供 Docker Hub 搜索与标签浏览,也可直接调用 API:
|
||||
|
||||
@@ -9,7 +9,7 @@ HubProxy Web 界面(`enableFrontend = true`)与 API 支持将镜像在线打
|
||||
|
||||
## Web 界面
|
||||
|
||||
访问 HubProxy 首页,在「离线镜像」功能中输入镜像名与标签即可下载。
|
||||
访问 HubProxy 首页,在「离线镜像」功能中输入镜像名与标签即可下载。架构选择时,若镜像不存在所选架构或输入有误,会自动回落到 `linux/amd64`。
|
||||
|
||||
## 单镜像 API
|
||||
|
||||
@@ -37,7 +37,7 @@ curl -L -o nginx.tar "https://example.com/api/image/download?image=library/nginx
|
||||
|
||||
| 参数 | 说明 |
|
||||
|------|------|
|
||||
| `platform` | 指定平台,如 `linux/amd64` |
|
||||
| `platform` | 指定平台,如 `linux/arm64`;匹配不到或格式错误时自动回落到 `linux/amd64` |
|
||||
| `tag` | 镜像未含 tag 时使用,默认 `latest` |
|
||||
| `compressed` | 是否压缩层,默认 `true` |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user