环境:操作系统win10,浏览器github访问不稳定,经常超时,使用ping github.com 发现ip访问正常,不存在超时或者丢包的情况,说明dns解析问题,解决方法添加本机host记录,亲测有效
host文件地址:C:\Windows\System32\drivers\etc文件夹下HOSTS文件(无后缀)
在末尾添加记录
############################################################## 151.101.65.194 github.global.ssl.fastly.net 185.199.111.153 assets-cdn.github.com 185.199.108.153 documentcloud.github.com 140.82.112.4 gist.github.com 185.199.109.133 gist.githubusercontent.com 185.199.108.154 github.githubassets.com 185.199.110.154 help.github.com 140.82.113.10 nodeload.github.com 185.199.110.133 raw.github.com 140.82.114.17 status.github.com 185.199.109.153 training.github.com 185.199.110.133 avatars.githubusercontent.com 185.199.110.133 avatars0.githubusercontent.com 185.199.109.133 avatars1.githubusercontent.com 185.199.109.133 avatars2.githubusercontent.com 185.199.108.133 avatars3.githubusercontent.com 185.199.110.133 avatars4.githubusercontent.com 185.199.111.133 avatars5.githubusercontent.com 185.199.109.133 avatars6.githubusercontent.com 185.199.111.133 avatars7.githubusercontent.com 185.199.111.133 avatars8.githubusercontent.com 185.199.111.133 favicons.githubusercontent.com 140.82.114.9 codeload.github.com 52.217.82.68 github-cloud.s3.amazonaws.com 52.217.85.92 github-com.s3.amazonaws.com 52.217.65.76 github-production-release-asset-2e65be.s3.amazonaws.com 52.217.44.116 github-production-user-asset-6210df.s3.amazonaws.com 52.216.144.179 github-production-repository-file-5c1aeb.s3.amazonaws.com 185.199.110.153 githubstatus.com 64.71.168.201 github.community 185.199.109.133 media.githubusercontent.com 185.199.108.133 camo.githubusercontent.com 185.199.109.133 raw.githubusercontent.com 185.199.110.133 cloud.githubusercontent.com 185.199.110.133 user-images.githubusercontent.com 185.199.109.153 customer-stories-feed.github.com 185.199.109.153 pages.github.com 140.82.112.5 api.github.com 140.82.113.26 live.github.com 140.82.113.30 githubapp.com 140.82.114.4 github.com
注意:直接添加无法保存,可以先复制HOST文件到桌面,在末尾添加后保存,再剪切到原文件夹下,复盖原文件
最后运行cmd,输入 ipconfig /flushdns,重写打开网页,即可正常访问
文章评论