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
最末尾添加兩句話:
151.101.185.194 http://github.global.ssl.fastly.net
192.30.253.112 http://github.com
然后保存就可以了。
Linux環境
sudo gedit /etc/hosts
添加
151.101.185.194 http://github.global.ssl.fastly.net
192.30.253.112 http://github.com
保存,退出,並重啟網絡
/etc/init.d/networking restart