mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
chore: add sourceGeoIP and sourceIPASN to metadata
This commit is contained in:
@@ -46,6 +46,14 @@ func (set *IpCidrSet) IsContain(ip netip.Addr) bool {
|
||||
return set.ToIPSet().Contains(ip.WithZone(""))
|
||||
}
|
||||
|
||||
// MatchIp implements C.IpMatcher
|
||||
func (set *IpCidrSet) MatchIp(ip netip.Addr) bool {
|
||||
if set.IsEmpty() {
|
||||
return false
|
||||
}
|
||||
return set.IsContain(ip)
|
||||
}
|
||||
|
||||
func (set *IpCidrSet) Merge() error {
|
||||
var b netipx.IPSetBuilder
|
||||
b.AddSet(set.ToIPSet())
|
||||
|
||||
Reference in New Issue
Block a user