一、下载安装SwitchHosts
image.png
SwitchHosts是一个管理hosts的优秀软件。
二、通过域名,查ip,配置hosts
1、打开 https://www.ipaddress.com/
2、查询这3个地址,得到ip
github.com
github.global.ssl.fastly.net
codeload.github.com
查询的例子
image.png
注意点:ip可能会变,如果慢了,就重新查询这3个,然后替换下变化的ip。
得到ip,配置下映射。
image.png
三、刷新DNS
sudo killall -HUP mDNSResponder
亲测有效
END