2023-11-17 23:12:10 +08:00
|
|
|
//go:build android && cmfa
|
2023-11-17 01:19:20 +08:00
|
|
|
|
|
|
|
package mmdb
|
|
|
|
|
|
|
|
import "github.com/oschwald/maxminddb-golang"
|
|
|
|
|
|
|
|
func InstallOverride(override *maxminddb.Reader) {
|
|
|
|
newReader := Reader{Reader: override}
|
|
|
|
switch override.Metadata.DatabaseType {
|
|
|
|
case "sing-geoip":
|
|
|
|
reader.databaseType = typeSing
|
|
|
|
case "Meta-geoip0":
|
|
|
|
reader.databaseType = typeMetaV0
|
|
|
|
default:
|
|
|
|
reader.databaseType = typeMaxmind
|
|
|
|
}
|
|
|
|
reader = newReader
|
|
|
|
}
|