feat: Prism HTTP/SOCKS5 代理网关及管理台
CI / docker (push) Successful in 2m54s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
renjue
2026-06-23 15:58:28 +08:00
commit fe8ea784d0
170 changed files with 20056 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
package geodata
import "testing"
func TestConfigFromSettingsUsesDefaults(t *testing.T) {
cfg := ConfigFromSettings(map[string]string{})
def := DefaultConfig()
if cfg.CountryMmdbURL != def.CountryMmdbURL || cfg.GeoIPURL != def.GeoIPURL || cfg.GeoSiteURL != def.GeoSiteURL {
t.Fatalf("expected defaults, got %+v", cfg)
}
}
func TestConfigFromSettingsOverrides(t *testing.T) {
cfg := ConfigFromSettings(map[string]string{
"geo_geoip_url": "https://example.com/geoip.dat",
})
if cfg.GeoIPURL != "https://example.com/geoip.dat" {
t.Fatalf("got %q", cfg.GeoIPURL)
}
if cfg.GeoSiteURL != DefaultConfig().GeoSiteURL {
t.Fatalf("expected default geosite url")
}
}