- 原博客地址: https://blog.csdn.net/weixin_37910453/article/details/86655613
- 快速访问
通过修改hosts文件来提速
获取github的IP地址
- 点击这里 依次获取以下三个网址的IP
- github.com
- github.global.ssl.fastly.net
- codeload.github.com
- 3. 获取到的IP,其实不用第一步.直接使用以下的ip地址
192.30.253.113 github.com 151.101.25.194 github.global.ssl.fastly.net 192.30.253.121 codeload.github.com
修改系统hosts
192.30.253.113 github.com 151.101.25.194 github.global.ssl.fastly.net 192.30.253.121 codeload.github.com
windows系统
- hosts文件路径:C:\Windows\System32\drivers\etc\hosts ,
- 添加上面查询到的IP到hosts文件中(此时可能需要管理员权限,可以将hosts复制到桌面,修改好了再复制回去覆盖原先的)
- 结果:
- 刷新DNS
ipconfig /flushdns
- 恭喜完成!!!
linux系统
- 打开hosts文件并修改
sudo vim /etc/hosts
- 插入ip映射保存退出
结果:
- 重启网络服务
sudo /etc/init.d/networking restart
恭喜完成!!!