Skip to content

Commit aeb045a

Browse files
author
sky22333
committed
update docs
1 parent 293c352 commit aeb045a

8 files changed

Lines changed: 24 additions & 22 deletions

File tree

docs/src/content/docs/deployment/architecture.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ description: 公网部署 HubProxy 的推荐拓扑与安全要求。
3232
| Docker 内 Caddy + HubProxy ||| ⭐⭐⭐ |
3333
| 本机 Nginx → HubProxy ||| ⭐⭐⭐ |
3434
| Cloudflare 直连 HubProxy | ❌ 共用 CDN IP || ⚠️ |
35-
| 公网直连 `0.0.0.0:5000` ||| ⚠️ 开放代理风险 |
36-
37-
## HTTP/3(QUIC)
38-
39-
Caddy 默认开启 HTTP/3 只影响「用户 → Caddy」段(UDP)。Caddy 回源 HubProxy 仍使用 TCP,当前 IP 信任机制无需额外配置。
35+
| 公网直连 `0.0.0.0:5000` ||| ⚠️ 容易被滥用 |
4036

4137
## 下一步
4238

docs/src/content/docs/en/deployment/architecture.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ Users → CDN (optional) → Caddy/Nginx (private/local) → HubProxy:5000
3232
| Docker Caddy + HubProxy ||| ⭐⭐⭐ |
3333
| Local Nginx → HubProxy ||| ⭐⭐⭐ |
3434
| Cloudflare direct to HubProxy | ❌ shared CDN IP || ⚠️ |
35-
| Public `0.0.0.0:5000` ||| ⚠️ open proxy risk |
36-
37-
## HTTP/3 (QUIC)
38-
39-
Caddy's HTTP/3 only affects the user → Caddy segment (UDP). Caddy still uses TCP to reach HubProxy — no extra IP trust configuration needed.
35+
| Public `0.0.0.0:5000` ||| ⚠️ easily abused |
4036

4137
## Next Steps
4238

docs/src/content/docs/en/guides/docker-mirror-sources.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ enabled = true
5151
## Pull Path Format
5252

5353
```bash
54-
# Docker Hub (no registry prefix needed)
55-
docker pull example.com/library/nginx:latest
54+
# Docker Hub (no registry prefix; library and latest added automatically for official images)
55+
docker pull example.com/nginx
5656

5757
# Third-party registry
5858
docker pull example.com/ghcr.io/owner/image:tag

docs/src/content/docs/en/guides/docker-mirror.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,18 @@ Extend or disable in `[registries]` — see [Registry Sources](/en/guides/docker
3636
## Pull Examples
3737

3838
```bash
39-
# Docker Hub
40-
docker pull example.com/library/nginx:latest
39+
# Docker Hub official image (no library prefix needed)
40+
docker pull example.com/nginx
41+
42+
# Docker Hub user image
43+
docker pull example.com/user/app:tag
4144

4245
# Third-party registry (path includes registry domain)
4346
docker pull example.com/ghcr.io/owner/image:tag
4447
```
4548

49+
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`.
50+
4651
## Image Search
4752

4853
The web UI (`enableFrontend = true`) provides Docker Hub search and tag browsing. API access:

docs/src/content/docs/en/guides/offline-images.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Downloads use a **two-step flow**: `prepare` for a one-time token, then download
99

1010
## Web UI
1111

12-
Visit the HubProxy homepage and use the offline image feature.
12+
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`.
1313

1414
## Single Image API
1515

@@ -37,7 +37,7 @@ Optional parameters:
3737

3838
| Param | Description |
3939
|-------|-------------|
40-
| `platform` | Target platform, e.g. `linux/amd64` |
40+
| `platform` | Target platform, e.g. `linux/arm64`; falls back to `linux/amd64` if unmatched or invalid |
4141
| `tag` | Used when image has no tag, default `latest` |
4242
| `compressed` | Compress layers, default `true` |
4343

docs/src/content/docs/guides/docker-mirror-sources.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ enabled = true
5151
## 拉取路径格式
5252

5353
```bash
54-
# Docker Hub(无需前缀 registry 域名)
55-
docker pull example.com/library/nginx:latest
54+
# Docker Hub(无需前缀 registry 域名,官方镜像自动补齐 library 与 latest
55+
docker pull example.com/nginx
5656

5757
# 第三方 Registry
5858
docker pull example.com/ghcr.io/owner/image:tag

docs/src/content/docs/guides/docker-mirror.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,18 @@ sudo systemctl restart docker
3636
## 拉取示例
3737

3838
```bash
39-
# Docker Hub
40-
docker pull example.com/library/nginx:latest
39+
# Docker Hub 官方镜像(无需写 library 前缀)
40+
docker pull example.com/nginx
41+
42+
# Docker Hub 用户镜像
43+
docker pull example.com/user/app:tag
4144

4245
# 第三方 Registry(路径含 registry 域名)
4346
docker pull example.com/ghcr.io/owner/image:tag
4447
```
4548

49+
官方镜像会自动补齐 `library/` 命名空间,未指定标签时自动使用 `latest`,即 `example.com/nginx` 等价于 `example.com/library/nginx:latest`
50+
4651
## 镜像搜索
4752

4853
Web 界面(`enableFrontend = true`)提供 Docker Hub 搜索与标签浏览,也可直接调用 API:

docs/src/content/docs/guides/offline-images.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ HubProxy Web 界面(`enableFrontend = true`)与 API 支持将镜像在线打
99

1010
## Web 界面
1111

12-
访问 HubProxy 首页,在「离线镜像」功能中输入镜像名与标签即可下载。
12+
访问 HubProxy 首页,在「离线镜像」功能中输入镜像名与标签即可下载。架构选择时,若镜像不存在所选架构或输入有误,会自动回落到 `linux/amd64`
1313

1414
## 单镜像 API
1515

@@ -37,7 +37,7 @@ curl -L -o nginx.tar "https://example.com/api/image/download?image=library/nginx
3737

3838
| 参数 | 说明 |
3939
|------|------|
40-
| `platform` | 指定平台,如 `linux/amd64` |
40+
| `platform` | 指定平台,如 `linux/arm64`;匹配不到或格式错误时自动回落到 `linux/amd64` |
4141
| `tag` | 镜像未含 tag 时使用,默认 `latest` |
4242
| `compressed` | 是否压缩层,默认 `true` |
4343

0 commit comments

Comments
 (0)