github下载慢,轻松提速教程

通过修改hosts文件来提速

获取github的IP地址

访问:https://www.ipaddress.com/ 网址 依次获取以下三个网址的IP

  1. github.com
  2. github.global.ssl.fastly.net
  3. codeload.github.com

在这里插入图片描述

这是我获取的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系统

  1. hosts文件路径:C:\Windows\System32\drivers\etc\hosts ,
  2. 添加上面查询到的IP到hosts文件中(此时可能需要管理员权限,可以将hosts复制到桌面,修改好了再复制回去覆盖原先的)
  3. 结果:
    在这里插入图片描述
  4. 刷新DNS
 ipconfig /flushdns

恭喜完成!!!

linux系统

  1. 打开hosts文件并修改
sudo vim /etc/hosts

插入ip映射保存退出
结果:
在这里插入图片描述
2.重启网络服务

sudo /etc/init.d/networking restart

恭喜完成!!!

附上一张效果图
在这里插入图片描述
(内网被限速在800kb/s,没有办法!!)

猜你喜欢

转载自blog.csdn.net/weixin_37910453/article/details/86655613