学习自该文章:https://blog.csdn.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

解决家里WIFI无法访问GITHUB(DNS问题)

windows

  • 编辑C:\Windows\System32\drivers\etc\hosts
  • 添加如下内容:
192.30.253.113     github.com
185.199.108.153    github.github.io
199.232.5.194 github.global.ssl.fastly.net
Logo

更多推荐