Migration: go 1.17

This commit is contained in:
Dreamacro
2021-08-18 13:26:23 +08:00
parent 1be09f5751
commit 571d2a0075
15 changed files with 44 additions and 17 deletions

View File

@ -20,6 +20,10 @@ func (g *GEOIP) Match(metadata *C.Metadata) bool {
if ip == nil {
return false
}
if g.country == "LAN" {
return ip.IsPrivate()
}
record, _ := mmdb.Instance().Country(ip)
return record.Country.IsoCode == g.country
}