mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-08-23 02:32:32 +00:00
19 lines
391 B
Go
19 lines
391 B
Go
|
// +build android
|
||
|
|
||
|
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
|
||
|
}
|