国内加速访问Github的办法

国内访问Github的办法

一、打开IPAddress.com网站,查询下面3个网址对应的IP地址

github.com
assets-cdn.github.com
github.global.ssl.fastly.net

二、修改本地电脑系统hosts文件

windows:
C:WindowsSystem32driversetc 
linux:
/etc/hosts

直接在最后加入以下代码

192.30.253.112 github.com
151.101.184.133 assets-cdn.github.com
151.101.185.194 github.global.ssl.fastly.net

三、刷新系统dns缓存(Windows)

Linux跳过该步骤

用WIN+R快捷键打开运行窗口,输入命令:cmd并回车进入命令行窗口。
接着输入命令:ipconfig /flushdns回车后执行刷新本地dns缓存数据即可。
原文地址:https://www.cnblogs.com/xianyao/p/11528729.html