Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 后缀匹配支持 #72

Closed
EkkoG opened this issue Jun 1, 2022 · 5 comments
Closed

IPv6 后缀匹配支持 #72

EkkoG opened this issue Jun 1, 2022 · 5 comments

Comments

@EkkoG
Copy link

EkkoG commented Jun 1, 2022

目标,支持如下配置方式

- SRC-IP-CIDR,::b1b/-64,DIRECT

运营商通常会分配一下 /56 的前缀地址,设备出口 IP 会不断的变化,造成无法使用前缀来进行准确的规则匹配

通常设备的 IPv6 地址后缀是固定的,https://ccie.lol/knowledge-base/ipv6-use-eui-64-convert-link-local-address/

所以可以根据后缀匹配,之前在上游提过一个 PR,不过没有合并 https://github.com/Dreamacro/clash/pull/1329

另外观察到现在地址匹配用了新的包 netip,之前的修改是基于旧实现改的

@MetaCubeX
Copy link
Collaborator

@EkkoG 你可以pr到这边😬

@Adlyq
Copy link
Collaborator

Adlyq commented Jun 1, 2022

@EkkoG 建议修改下pr到这里,ipcidr,::1234/-16,direct
表示后16位匹配

@Adlyq
Copy link
Collaborator

Adlyq commented Jun 1, 2022

@Adlyq 算了,我写吧

@EkkoG
Copy link
Author

EkkoG commented Jun 3, 2022

CleanShot 2022-06-03 at 14 09 23@2x

已经用上了,感谢!辛苦!

@EkkoG EkkoG closed this as completed Jun 3, 2022
@MetaCubeX
Copy link
Collaborator

@EkkoG 有其他好建议且有能力写的,欢迎直接pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants