fix: add binary release assets to CI and update download allowlist

- Build linux_amd64 binary in CI and upload to Gitea release assets
- Add checksums.txt for integrity verification
- Update allowed download hosts to Gitea domain/IP
This commit is contained in:
kone
2026-06-09 01:13:48 +08:00
parent 0984773711
commit d702f74582
2 changed files with 33 additions and 5 deletions
+3 -3
View File
@@ -22,11 +22,11 @@ import (
const (
updateCacheKey = "update_check_cache"
updateCacheTTL = 1200 // 20 minutes
defaultGitHubRepo = "man209111-cpu/sub2api"
defaultGitHubRepo = "kgod/sub2api"
// Security: allowed download domains for updates
allowedDownloadHost = "github.com"
allowedAssetHost = "objects.githubusercontent.com"
allowedDownloadHost = "git.jianshixingqiu.com"
allowedAssetHost = "8.138.12.104"
// Security: max download size (500MB)
maxDownloadSize = 500 * 1024 * 1024