Chore: embed the RuleExtra into Base
This commit is contained in:
@ -20,7 +20,11 @@ type geoipFilter struct {
|
||||
|
||||
func (gf *geoipFilter) Match(ip net.IP) bool {
|
||||
record, _ := mmdb.Instance().Country(ip)
|
||||
return !strings.EqualFold(record.Country.IsoCode, gf.code) && !ip.IsPrivate() && !ip.Equal(C.TunBroadcastAddr)
|
||||
return !strings.EqualFold(record.Country.IsoCode, gf.code) &&
|
||||
!ip.IsPrivate() &&
|
||||
!ip.IsLoopback() &&
|
||||
!ip.IsUnspecified() &&
|
||||
!ip.Equal(C.TunBroadcastAddr)
|
||||
}
|
||||
|
||||
type ipnetFilter struct {
|
||||
|
Reference in New Issue
Block a user