fix: geox url setting

This commit is contained in:
adlyq 2022-05-27 12:16:04 +08:00
parent ac36473d13
commit 7858ca6cc5
2 changed files with 4 additions and 4 deletions

View File

@ -158,10 +158,10 @@ func Init(dir string) error {
}
if !C.GeodataMode {
C.GeodataMode = rawCfg.GeodataMode
C.GeoIpUrl = rawCfg.GeoXUrl.GeoIp
C.GeoSiteUrl = rawCfg.GeoXUrl.GeoSite
C.MmdbUrl = rawCfg.GeoXUrl.Mmdb
}
C.GeoIpUrl = rawCfg.GeoXUrl.GeoIp
C.GeoSiteUrl = rawCfg.GeoXUrl.GeoSite
C.MmdbUrl = rawCfg.GeoXUrl.Mmdb
// initial GeoIP
if err := initGeoIP(); err != nil {
return fmt.Errorf("can't initial GeoIP: %w", err)

View File

@ -19,7 +19,7 @@ func UpdateGeoDatabases() error {
if C.GeodataMode {
if err := downloadGeoIP(tmpGepIP); err != nil {
return fmt.Errorf("can't download MMDB database file: %w", err)
return fmt.Errorf("can't download GeoIP database file: %w", err)
}
if err := verifyGeoSite("temp_geoip.dat"); err != nil {