Add IPv6 CIDR matching and /64 unique-IP comparison. - #935
Merged
connorgallopo merged 1 commit intoJul 21, 2026
Merged
Conversation
IP Range rules now match IPv6 CIDRs via BlockList. Unique IPs, Unique IPs in Window, and Concurrent Streams same-IP exclude compare IPv6 by /64 (IPv4 unchanged). IPv4-mapped addresses are unmapped before matching so dual-stack clients work with v4 rules.
Owner
|
This looks great - Thank you for the scope adjustment and working the process! |
connorgallopo
approved these changes
Jul 20, 2026
Contributor
Author
|
Thank you 🥳 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This implements the Part 1 approach discussed in #934.
It adds IPv6 support to IP Range rules and updates the Unique IP comparisons used by Unique IPs, Unique IPs in Window, and the Concurrent Streams "same IP" exclusion to compare IPv6 addresses by
/64. Existing IPv4 behaviour is unchanged.As discussed I've kept the scope narrow. No configurable IPv6 prefixes, LAN household grouping, or any schema/UI/template changes.
Type of change
Related issue
Closes #934
What's included
isIpInCidrusing Node'sBlockListfor IPv4 and IPv6 CIDR matching.::ffff:x.x.x.xand the hexadecimal form, rare but good idea to cover) before CIDR matching and Unique IP comparisons.toNetworkKey:/64.exclude_same_ipTesting
pnpm typecheckpnpm lintpnpm test:unit