推广一个探测 IP 配置 Hosts 的小工具

45 天前
 gongym

说明

一个小工具,用于向 dns 服务器查询域名解析的 ip 并自动检测 ip 的延时

使用场景比较有限。

推荐自行编译并且配置好需要查询的域名

流程

  1. 根据域名,到 DNS 服务器解析出 A 类 IP 地址
  2. 对解析出的 IP 地址使用 PING 命令检查延时
  3. 选择延时最低的 IP 地址,最终生成 hosts 文件

hosts

140.82.113.26 alive.github.com
20.27.177.116 api.github.com
185.199.108.153 assets-cdn.github.com
185.199.110.133 avatars.githubusercontent.com
185.199.109.133 avatars0.githubusercontent.com
185.199.109.133 avatars1.githubusercontent.com
185.199.109.133 avatars2.githubusercontent.com
185.199.109.133 avatars3.githubusercontent.com
185.199.109.133 avatars4.githubusercontent.com
185.199.110.133 avatars5.githubusercontent.com
185.199.108.133 camo.githubusercontent.com
140.82.112.21 central.github.com
185.199.109.133 cloud.githubusercontent.com
20.27.177.114 codeload.github.com
140.82.112.21 collector.github.com
185.199.110.133 desktop.githubusercontent.com
185.199.110.133 favicons.githubusercontent.com
243.185.187.39 gist.github.com
52.217.235.225 github-cloud.s3.amazonaws.com
54.231.136.169 github-com.s3.amazonaws.com
16.182.72.57 github-production-release-asset-2e65be.s3.amazonaws.com
52.217.113.65 github-production-repository-file-5c1aeb.s3.amazonaws.com
54.231.137.161 github-production-user-asset-6210df.s3.amazonaws.com
192.0.66.2 github.blog
20.27.177.113 github.com
140.82.113.17 github.community
185.199.110.154 github.githubassets.com
151.101.37.194 github.global.ssl.fastly.net
185.199.110.153 github.io
185.199.108.133 github.map.fastly.net
185.199.110.153 githubstatus.com
140.82.113.26 live.github.com
185.199.109.133 media.githubusercontent.com
185.199.108.133 objects.githubusercontent.com
13.107.42.16 pipelines.actions.githubusercontent.com
185.199.109.133 raw.githubusercontent.com
185.199.110.133 user-images.githubusercontent.com
185.199.110.133 private-user-images.githubusercontent.com
13.107.246.64 vscode.dev
140.82.112.21 education.github.com

依赖库

dns

ping

govcl

DNS 服务器

1.1.1.1
1.2.4.8
4.2.2.1
8.8.8.8
8.20.247.20
8.26.56.26
9.9.9.9
45.11.45.11
64.6.64.6
74.82.42.42
77.88.8.8
80.80.80.80
84.200.69.80
94.140.14.14
101.101.101.101
101.226.4.6
114.114.114.114
119.29.29.29
156.154.70.1
168.126.63.1
180.76.76.76
180.184.1.1
182.254.118.118
185.222.222.222
195.46.39.39
199.85.126.10
202.120.2.100
208.67.222.222
210.2.4.8
223.5.5.5

软件截图

683 次点击
所在节点    推广
4 条回复
vokins
45 天前
在哪下载啊?
miaomiao888
45 天前
这些 DNS 都是以非加密的 UDP 协议查询吗,是的话解析某些污染域名可能不行。
最近正好在想一个问题,有没一种公共 DNS 或本地 DNS 工具可以实现获取一个域名所有的(不同地区)解析结果。
不是向多个上游查询的那种。
0o0O0o0O0o
45 天前
@miaomiao888 #2 我可以想到两种办法:

1. 用多点 ping 工具网站
2. 用 client subnet 查询

```
q A google.com @https://149.112.112.11 --subnet=15.230.102.0/24
q A google.com @https://149.112.112.11 --subnet=150.222.78.0/24
```

q 是 https://github.com/natesales/q
149.112.112.11 是 quad9 dns
subnet 分别是美国和新加坡的一个 cidr
gongym
45 天前
@vokins 不好意思,忘记发项目地址了

https://github.com/ggymm/auto-hosts

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1062436

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX