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

@ -15,7 +15,7 @@ type geoipFilter struct{}
func (gf *geoipFilter) Match(ip net.IP) bool {
record, _ := mmdb.Instance().Country(ip)
return record.Country.IsoCode != "CN" && record.Country.IsoCode != ""
return record.Country.IsoCode != "CN" && !ip.IsPrivate()
}
type ipnetFilter struct {