feat: custom domain management, config and notification fixes, and VPS auto-renewal rollover

This commit is contained in:
Bot
2026-08-31 05:04:19 +08:00
parent 00f5777112
commit f7bd86af4d
26 changed files with 539 additions and 334 deletions
+3
View File
@@ -42,12 +42,15 @@ func serveAgentBinary(c *gin.Context) {
// In a real scenario, you might want to cache this or use a specific version
zipUrl := fmt.Sprintf("https://github.com/%s/releases/latest/download/nezha-agent_%s_%s.zip", repo, osType, arch)
// #nosec G107
resp, err := http.Get(zipUrl)
if err != nil || resp.StatusCode != http.StatusOK {
// Try Gitee if GitHub fails
zipUrl = fmt.Sprintf("https://gitee.com/naibahq/agent/releases/latest/download/nezha-agent_%s_%s.zip", osType, arch)
// #nosec G107
resp, err = http.Get(zipUrl)
if err != nil || resp.StatusCode != http.StatusOK {
c.JSON(http.StatusBadGateway, gin.H{"error": "Failed to fetch agent binary from upstream"})
return
}