zu1k / nali

An offline tool for querying IP geographic information and CDN provider. 一个查询IP地理信息和CDN服务提供商的离线终端工具.
https://github.com/zu1k/nali
MIT License
3.76k stars 340 forks source link

需要支持通配符或者正则 #106

Closed 4ft35t closed 2 years ago

4ft35t commented 2 years ago

可能需要引入字符串 glob 或者正则来处理。

阿里云全局流量管理,https://help.aliyun.com/document_detail/283229.html

通过 ICP 备案查询,阿里云注册了 63 个域名

gtm-a1b1.com  ~ gtm-a1b9.com
...
gtm-a7b1.com  ~ gtm-a7b9.com

添加设置 https://github.com/4ft35t/cdn/commit/47fa60c9db2194b86f13d5d30403e4a6af5baffc

gtm-a[1-7]b[1-9].com:
  name: 阿里云全局流量管理
  link: https://help.aliyun.com/document_detail/283229.html

可测试域名

nslookup exp.leuke.cn 114.114.114.114
Server:         114.114.114.114
Address:        114.114.114.114#53

Non-authoritative answer:
exp.leuke.cn    canonical name = gtm-cn-zvp2nicnw08.gtm-a2b2.com.
Name:   gtm-cn-zvp2nicnw08.gtm-a2b2.com
Address: 59.110.23.54
4ft35t commented 2 years ago

上次的通配符问题是用硬编码解决的 https://github.com/zu1k/nali/issues/18

4ft35t commented 2 years ago

app.jiayouxueba.cn canonical name = gtm-cn-09k20o0w303.gtm-a2b3.com.

4ft35t commented 2 years ago

i.ykzq.com canonical name = gtm-cn-tl32aldbw0n.gtm-a5b3.com.

4ft35t commented 2 years ago

腾讯云的 https://github.com/4ft35t/cdn/commit/d38b4f9e7fbdc0e012ee022fce0d457c72d2ce7f

tdnsv1.com ~ tdnsv15.com

nslookup imgv4.tvsou.com 114.114.114.114
Server:         114.114.114.114
Address:        114.114.114.114#53

Non-authoritative answer:
Name:   imgv4.tvsou.com
Address: 112.17.54.217
Name:   imgv4.tvsou.com
Address: 117.167.118.145
Name:   imgv4.tvsou.com
Address: 112.17.55.147
imgv4.tvsou.com canonical name = imgv4.tvsou.com.cdn.dnsv1.com.
imgv4.tvsou.com.cdn.dnsv1.com   canonical name = rdalfuzt.slt.sched.tdnsv8.com.
zu1k commented 2 years ago

v0.4.4 版本已支持正则方式匹配,感谢维护数据库