Style: code style

This commit is contained in:
yaling888
2022-03-15 02:55:06 +08:00
parent 5abd03e241
commit 20b66d9550
20 changed files with 110 additions and 109 deletions

View File

@ -7,7 +7,6 @@ import (
"github.com/Dreamacro/clash/component/geodata/router"
"github.com/Dreamacro/clash/component/mmdb"
"github.com/Dreamacro/clash/component/trie"
C "github.com/Dreamacro/clash/constant"
)
type fallbackIPFilter interface {
@ -20,11 +19,7 @@ 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.IsLoopback() &&
!ip.IsUnspecified() &&
!ip.Equal(C.TunBroadcastAddr)
return !strings.EqualFold(record.Country.IsoCode, gf.code) && !ip.IsPrivate()
}
type ipnetFilter struct {