今天访问 http://raw.githubusercontent.com/ 时,提示无法访问,可能是因为某些众所周知的原因导致 DNS 污染,最终通过修改 host 解决问题。
解决方案
查询真实 IP
通过 IPAddress.com 查询 http://raw.githubusercontent.com/ 的真实 IP,
可知其真实 IP 为 199.232.68.133。
修改 hosts
CentOS 及 macOS 直接在终端输入
sudo vi /etc/hosts
编辑 hosts 文件,新增下列内容
140.82.114.3 github.com
185.199.111.133 raw.githubusercontent.com
保存即可。
What IP addresses does raw.githubusercontent.com resolve to?
raw.githubusercontent.com resolves to 4 IPv4 addresses and 4 IPv6 addresses:
185.199.108.133
185.199.109.133
185.199.110.133
185.199.111.133
2606:50c0:8000::154
2606:50c0:8001::154
2606:50c0:8002::154
2606:50c0:8003::154
In what country are raw.githubusercontent.com servers located in?
raw.githubusercontent.com has servers located in the United States.
本文由 admin 创作,采用 知识共享署名4.0 国际许可协议进行许可
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名
最后编辑时间为: Sep 5, 2024 at 09:34 am