Replace ipnet dependency with inline CidrRange for CIDR matching

Remove the ipnet crate and implement a lightweight CidrRange struct
  that handles IPv4/IPv6 CIDR parsing and containment checks using
  bitwise masking. Adds tests for invalid prefixes and cross-family
  non-matching.
This commit is contained in:
Timothy Miller
2026-03-18 19:53:51 -04:00
parent 4b1875b0cd
commit ac982a208e
3 changed files with 64 additions and 10 deletions

View File

@@ -15,7 +15,6 @@ chrono = { version = "0.4", features = ["clock"] }
url = "2"
idna = "1"
if-addrs = "0.13"
ipnet = "2"
[profile.release]
opt-level = "s"