mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 00:01:10 +08:00
commit
5c25bc012f
6 changed files with 21 additions and 6 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -1,5 +1,15 @@
|
|||
# 更新日志
|
||||
|
||||
3.3.1 - 2025-05-16
|
||||
- CHANGE: 为`target`放宽限制, 支持自定义
|
||||
- CHANGE: 更新`hertz`, `0.9.7`=>`0.10.0`
|
||||
|
||||
25w37a - 2025-05-16
|
||||
---
|
||||
- PRE-RELEASE: 此版本是v3.3.1预发布版本,请勿在生产环境中使用;
|
||||
- CHANGE: 为`target`放宽限制, 支持自定义
|
||||
- CHANGE: 更新`hertz`, `0.9.7`=>`0.10.0`
|
||||
|
||||
3.3.0 - 2025-05-15
|
||||
---
|
||||
- CHANGE: 为`httpc`加入`request builder`的`withcontext`选项
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
25w36d
|
||||
25w37a
|
||||
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
3.3.0
|
||||
3.3.1
|
||||
2
go.mod
2
go.mod
|
|
@ -6,7 +6,7 @@ require (
|
|||
github.com/BurntSushi/toml v1.5.0
|
||||
github.com/WJQSERVER-STUDIO/httpc v0.5.1
|
||||
github.com/WJQSERVER-STUDIO/logger v1.6.0
|
||||
github.com/cloudwego/hertz v0.9.7
|
||||
github.com/cloudwego/hertz v0.10.0
|
||||
github.com/hertz-contrib/http2 v0.1.8
|
||||
golang.org/x/net v0.40.0
|
||||
golang.org/x/time v0.11.0
|
||||
|
|
|
|||
4
go.sum
4
go.sum
|
|
@ -24,8 +24,8 @@ github.com/cloudwego/base64x v0.1.5 h1:XPciSp1xaq2VCSt6lF0phncD4koWyULpl5bUxbfCy
|
|||
github.com/cloudwego/base64x v0.1.5/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
|
||||
github.com/cloudwego/gopkg v0.1.4 h1:EoQiCG4sTonTPHxOGE0VlQs+sQR+Hsi2uN0qqwu8O50=
|
||||
github.com/cloudwego/gopkg v0.1.4/go.mod h1:FQuXsRWRsSqJLsMVd5SYzp8/Z1y5gXKnVvRrWUOsCMI=
|
||||
github.com/cloudwego/hertz v0.9.7 h1:tAVaiO+vTf+ZkQhvNhKbDJ0hmC4oJ7bzwDi1KhvhHy4=
|
||||
github.com/cloudwego/hertz v0.9.7/go.mod h1:t6d7NcoQxPmETvzPMMIVPHMn5C5QzpqIiFsaavoLJYQ=
|
||||
github.com/cloudwego/hertz v0.10.0 h1:V0vmBaLdQPlgL6w2TA6PZL1g6SGgQznFx6vqxWdCcKw=
|
||||
github.com/cloudwego/hertz v0.10.0/go.mod h1:lRBohmcDkGx5TLK6QKFGdzJ6n3IXqGueHsOiXcYgXA4=
|
||||
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
|
||||
github.com/cloudwego/netpoll v0.7.0 h1:bDrxQaNfijRI1zyGgXHQoE/nYegL0nr+ijO1Norelc4=
|
||||
github.com/cloudwego/netpoll v0.7.0/go.mod h1:PI+YrmyS7cIr0+SD4seJz3Eo3ckkXdu2ZVKBLhURLNU=
|
||||
|
|
|
|||
|
|
@ -18,10 +18,15 @@ func GhcrRouting(cfg *config.Config) app.HandlerFunc {
|
|||
GhcrRequest(ctx, c, "https://ghcr.io"+string(c.Request.RequestURI()), cfg, "ghcr")
|
||||
} else if cfg.Docker.Target == "dockerhub" {
|
||||
GhcrRequest(ctx, c, "https://registry-1.docker.io"+string(c.Request.RequestURI()), cfg, "dockerhub")
|
||||
} else if cfg.Docker.Target != "" {
|
||||
// 自定义taget
|
||||
GhcrRequest(ctx, c, "https://"+cfg.Docker.Target+string(c.Request.RequestURI()), cfg, "custom")
|
||||
} else {
|
||||
ErrorPage(c, NewErrorWithStatusLookup(403, "Docker Target is not Allowed"))
|
||||
// 配置为空
|
||||
ErrorPage(c, NewErrorWithStatusLookup(403, "Docker Target is not set"))
|
||||
return
|
||||
}
|
||||
|
||||
} else {
|
||||
ErrorPage(c, NewErrorWithStatusLookup(403, "Docker is not Allowed"))
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue