mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-03-06 05:58:58 +00:00
feat: add IP-ASN rule
This commit is contained in:
@@ -24,7 +24,7 @@ var geoIPMatcher *router.GeoIPMatcher
|
||||
|
||||
func (gf *geoipFilter) Match(ip netip.Addr) bool {
|
||||
if !C.GeodataMode {
|
||||
codes := mmdb.Instance().LookupCode(ip.AsSlice())
|
||||
codes := mmdb.IPInstance().LookupCode(ip.AsSlice())
|
||||
for _, code := range codes {
|
||||
if !strings.EqualFold(code, gf.code) && !ip.IsPrivate() {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user