Windows及linux加快github的下载速度
学习自该文章:https://blog.****.net/mist99/article/details/80602090
准备工作
- 1.获取 global.ssl.fastly地址
访问 http://github.global.ssl.fastly.net.ipaddress.com/#ipinfo
获取cdn域名以及ip地址
- 2.获取github地址
访问 http://github.com.ipaddress.com/#ipinfo
获取cdn域名以及ip地址
- 3.获取以上信息后,即可进行第三步,进行hosts域名映射
Windows
- 打开文件:
C:\Windows\System32\drivers\etc\hosts
-
末尾加上:
-
包存即可对比速度
需要8个小时下载的compose包,修改后只需30秒
Linux
- 修改hosts文件
sudo vim /etc/hosts
-
同样添加上述内容
- 保存,退出后,重启网络
sudo service networking restart