使用加速地址更新

This commit is contained in:
2025-11-10 18:53:48 +08:00
parent 07c5527243
commit 413df78f51
3 changed files with 6 additions and 4 deletions

View File

@@ -13,7 +13,9 @@ func Boot() {
getDev, _ := g.Cfg().GetWithEnv(gctx.New(), "dev")
if !getDev.Bool() {
var update = updateGithub.New("https://api.github.com/repos/ayflying/p2p/releases/latest")
url := "https://api.github.com/repos/ayflying/p2p/releases/latest"
url = "https://gh-proxy.com/" + url
var update = updateGithub.New(url)
// 每天0点检查更新
gcron.Add(gctx.New(), "0 0 0 * * *", func(ctx context.Context) {
err := update.CheckUpdate(true)