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

解决 Github 域名 DNS 污染问题 #8

Open
yangruihan opened this issue Sep 19, 2020 · 1 comment
Open

解决 Github 域名 DNS 污染问题 #8

yangruihan opened this issue Sep 19, 2020 · 1 comment
Labels

Comments

@yangruihan
Copy link
Owner

yangruihan commented Sep 19, 2020

解决 Github 域名 DNS 污染问题

问题背景

最近发现 github 的用户头像和自己文章中的图片显示不出来了,通过 Homebrew 安装也出问题了

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

网上搜索了一下,发现是 github 的一些域名的 DNS 解析被污染,导致DNS 解析过程无法通过域名取得正确的IP地址

解决方案

打开 https://www.ipaddress.com/ 输入访问不了的域名

查询之后可以获得正确的 IP 地址

image

在本机的 host 文件中添加,建议使用 SwitchHosts 方便 host 管理

199.232.68.133 raw.githubusercontent.com
199.232.68.133 user-images.githubusercontent.com
199.232.68.133 avatars2.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com

添加以上几条 host 配置,页面的图片展示就正常了,homebrew 也能装了

@joket1999
Copy link

修改电脑的dns为google的dns服务器ip

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

No branches or pull requests

2 participants