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

补一个香港 IP range,另外建议除了 CIDR 版以外,还可以提供 IP Range 版 #3

Open
asbai opened this issue May 3, 2020 · 0 comments

Comments

@asbai
Copy link

asbai commented May 3, 2020

Alibaba.com LLC AL-3 (NET-47-235-0-0-1) 47.235.0.0 - 47.246.255.255

另外建议除了 CIDR 版以外,还可以提供 IP Range 版:现在从 https://ispip.clang.cn/ 下载的文件,不管是否带有 _cidr 后缀,貌似其实都是 cidr 格式的。比如:https://ispip.clang.cn/chinatelecom.txt 其实与 https://ispip.clang.cn/chinatelecom_cidr.txt 一样,都是 CIDR 格式?

希望有类似 APNIC Whois 返回的这种“47.235.0.0 - 47.246.255.255” IP Range 格式的版本。IP Range 版本有助于降低索引条目数,提升搜索效率。

例如:将上述单条 IP Range 47.235.0.0 - 47.246.255.255 转换为 CIDR 表述,会生成如下 5 条记录:

47.235.0.0/16
47.236.0.0/14
47.240.0.0/14
47.244.0.0/15
47.246.0.0/16

条目数变多显然会导致搜索和匹配效率下降(例如:B树索引的搜索效率为 O(log(N)),显然 N 越小性能越好)。因此希望能够生成 IP rnage 版本。

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

1 participant