您的位置:首页 > 编程语言

访问github缓慢的问题解决

2020-07-29 17:09 253 查看

解决方法

在本地的hosts文件添加地址映射 免去浏览器向上一层层找寻ip的过程
个人理解是:hosts文件是本地的DNS,访问网站时,先在本地的hosts文件上根据域名找寻ip,找不到才向上方DNS服务器找ip

hosts文件的位置

windos下一般就是C:\Windows\System32\drivers\etc\hosts
如果使用火绒的话里面就可以在里面直接修改hosts文件

需要添加的内容

添加的是域名到ip的映射,这个映射容易找到通过一些工具,比如这里
这里附上一些我自己用到过的

185.199.108.154               github.githubassets.com
199.232.68.133                camo.githubusercontent.com
199.232.68.133                github.map.fastly.net
199.232.69.194                github.global.ssl.fastly.net
140.82.113.3                  github.com
140.82.114.6                  api.github.com
199.232.68.133                raw.githubusercontent.com
199.232.68.133                user-images.githubusercontent.com
199.232.68.133                favicons.githubusercontent.com
199.232.68.133                avatars5.githubusercontent.com
199.232.68.133                avatars4.githubusercontent.com
199.232.68.133                avatars3.githubusercontent.com
199.232.68.133                avatars2.githubusercontent.com
199.232.68.133                avatars1.githubusercontent.com
199.232.68.133                avatars0.githubusercontent.com
35.157.223.92	www.erlang.org

刷新DNS配置

win+r 输入cmd 然后ipconfig /flushdns回车就好了
(这里的win 有些电脑上就是键盘上win键,有些是画了联想标记的,四个小矩形构成一个大矩形)

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: