feat: refresh ASN prefixes with bounded Go loader

This commit is contained in:
spiritlhl committed 2026-07-21 00:42:30 +08:00
1 parent dd4fdcdaea
commit a32a1067d3
11 files changed
+632 -42

No files matched your search

+3 -3
View File
@@ -80,11 +80,11 @@ func getData(endpoint string) string {
InitLogger()
defer Logger.Sync()
}
// 先测试CDN可用性
testUrl := "https://raw.githubusercontent.com/spiritLHLS/ecs/main/back/test"
cdnUrl := checkCdn(testUrl)
// 如果有可用的CDN,使用CDN获取数据
if cdnUrl != "" {
url := cdnUrl + endpoint
@@ -106,7 +106,7 @@ func getData(endpoint string) string {
Logger.Info(fmt.Sprintf("CDN request failed: %v", err))
}
}
// CDN不可用,尝试直连
if model.EnableLoger {
Logger.Info(fmt.Sprintf("Trying direct connection: %s", endpoint))