HH-635: avoid runtime GeoIP download (#4)
Docker image / Test (push) Successful in 39s
Docker image / Build and publish (push) Failing after 34s

This commit was merged in pull request #4.
This commit is contained in:
2026-08-24 23:30:26 +08:00
parent d61799d180
commit 5f5b5799e4
4 changed files with 13 additions and 8 deletions
+1 -1
View File
@@ -296,7 +296,7 @@ func Run(ctx context.Context, config RuntimeConfig) error {
return reloadSubscription(ctx, client)
}
if err := updateSubscription(ctx, client, config.SubscriptionURL, activeSubscription, validate); err != nil {
return fmt.Errorf("initial subscription update failed")
return fmt.Errorf("initial subscription update failed: %w", err)
}
if err := validateMihomoConfig(ctx, config.CoreBinary, runtimeDir, runtimeConfig); err != nil {
return errors.New("generated Mihomo configuration failed validation")
+3 -1
View File
@@ -58,12 +58,14 @@ func TestSeededConfigUsesLocalACL4SSRRulesAndMemorySubscription(t *testing.T) {
"Microsoft: {type: file, behavior: classical, format: yaml, path: /usr/local/share/ssclash/rules/Ruleset/Microsoft.yaml}",
"Telegram: {type: file, behavior: classical, format: yaml, path: /usr/local/share/ssclash/rules/Ruleset/Telegram.yaml}",
"ChinaCompanyIp: {type: file, behavior: ipcidr, format: yaml, path: /usr/local/share/ssclash/rules/ChinaCompanyIp.yaml}",
"ChinaIp: {type: file, behavior: ipcidr, format: yaml, path: /usr/local/share/ssclash/rules/ChinaIp.yaml}",
"RULE-SET,ChinaIp,🎯 全球直连",
} {
if !strings.Contains(config, required) {
t.Errorf("seeded config is missing %q", required)
}
}
if strings.Contains(config, "raw.githubusercontent.com") || strings.Contains(config, "type: http") {
if strings.Contains(config, "raw.githubusercontent.com") || strings.Contains(config, "type: http") || strings.Contains(config, "GEOIP,CN,") {
t.Error("seeded config depends on an online rule or subscription provider")
}
}