github访问加速-修改hosts文件

Posted g0rez

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了github访问加速-修改hosts文件相关的知识,希望对你有一定的参考价值。

修改系统hosts文件,绕过国内dns解析,直接访问GitHub的CDN节点

打开系统hosts文件(需管理员权限)。
路径 :C:\\Windows\\System32\\drivers\\etc

添加一下内容

13.127.152.42 codeload.github.com
151.101.88.133 github.map.fastly.net
151.101.88.133 favicons.githubusercontent.com
151.101.88.133 raw.github.com
151.101.88.133 raw.githubusercontent.com
151.101.88.133 camo.githubusercontent.com
151.101.88.133 cloud.githubusercontent.com
151.101.88.133 avatars.githubusercontent.com
151.101.88.133 avatars0.githubusercontent.com
151.101.88.133 avatars1.githubusercontent.com
151.101.88.133 avatars2.githubusercontent.com
151.101.88.133 avatars3.githubusercontent.com
151.101.88.133 user-images.githubusercontent.com
185.199.111.154 github.githubassets.com
52.69.239.207 api.github.com
52.74.223.119 gist.github.com

刷新本地DNS缓存

打开命令提示符,输入:ipconfig /flushdns

返回显示:
Windows IP 配置
已成功刷新 DNS 解析缓存。

以上是关于github访问加速-修改hosts文件的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu18修改host文件加速访问Github

Ubuntu18修改host文件加速访问Github

Ubuntu18修改host文件加速访问Github

利用火绒安全软件修改host文件,加速访问GitHub网站

加快访问GitHub的速度

如何提高国内访问GitHub的速度达到2MB/S以上(附赠9种方案)