在https://www.ipaddress.com 查找 http://github.com 和 http://global-ssl.fastly.Net 對應的IP地址,例如:
140.82.112.3 對應的 http://github.com
199.232.69.194 對應的 http://github.global.ssl.fastly.net
199.232.68.249 對應的 http://global-ssl.fastly.net
185.199.108.153 對應的 http://assets-cdn.github.com
(這一步可能有差異,自己搜索保證最新)
Mac下:
打開文件路徑/etc/hosts,將下列內容加入hosts文件后面:
140.82.112.3 github.com
199.232.69.194 github.global.ssl.fastly.net
199.232.68.249 global-ssl.fastly.net
185.199.108.153 assets-cdn.github.com
打開終端:輸入以下內容,刷新DNS緩存:sudo dscacheutil -flushcache
Windows下:
用記事本打開hosts文件(路徑在:C:\Windows\System32\drivers\etc\hosts)
將下列內容加入到hosts文件中:
140.82.112.3 github.com
199.232.69.194 github.global.ssl.fastly.net
199.232.68.249 global-ssl.fastly.net
185.199.108.153 assets-cdn.github.com
打開終端:輸入以下內容,刷新DNS緩存:ipconfig /flushdns
完畢!(親測mac下原本下載速度10K/s至200~300k/s)
其實還有一種,翻牆,哈哈哈哈