This commit is contained in:
wjqserver 2025-04-25 17:14:33 +08:00
parent 47de48bcce
commit a7be65a111
4 changed files with 19 additions and 2 deletions

14
proxy/ghcr.go Normal file
View file

@ -0,0 +1,14 @@
package proxy
import (
"context"
"ghproxy/config"
"github.com/cloudwego/hertz/pkg/app"
)
func GhcrRouting(cfg *config.Config) app.HandlerFunc {
return func(ctx context.Context, c *app.RequestContext) {
ChunkedProxyRequest(ctx, c, "https://ghcr.io"+string(c.Request.RequestURI()), cfg, "ghcr")
}
}