Support matching ip interface id for ip_cidr rule
Added support for matching IPv6's interface id, using a syntax like ::1/::ff in ip_cidr and source_ip_cidr.
Fix #2204
cc @dyhkwong
I don't merge PR but here is my thoughts:
-
This is only a syntactic sugar of existing functionality.
-
CIDR is also used elsewhere, e.g.
tun.address,tun.route_addressandtun.route_exclude_address. -
This may require a version bump of ruleset. There is already a pending one https://github.com/SagerNet/sing-geosite/commit/9f8a5e7cba4f10cbb65ea2ba2ce81201bdb0595a.
Not sure i quite understand
This is only a syntactic sugar of existing functionality.
Maybe I missed something, but how can an interface id currently be matched without this PR?
CIDR is also used elsewhere, e.g. tun.address, tun.route_address and tun.route_exclude_address.
These are not matching rules? Are you suggesting they should also support the ::1/:ff syntax? But this syntax is not a valid address.
Maybe I missed something, but how can an interface id currently be matched without this PR?
So this is in fact something like SagerNet/sing-box#2014?
yep, that person was asking the same feature. But it's not really syntactic sugar if it's not already achievable with the current rules, imho.
Maybe this should be a new type of rule. And the author of #2014 mentioned that this is also for tun.route_address_set?