chore: add sourceGeoIP and sourceIPASN to metadata

This commit is contained in:
wwqgtxx
2024-08-28 12:25:45 +08:00
parent 8483178524
commit 4fecf68b8b
17 changed files with 211 additions and 211 deletions

View File

@@ -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())