hosts 文件路径
mac: /etc/hosts
win: C:\WINDOWS\system32\drivers\etc\hosts
# GitHub Start
140.82.113.4 github.com
140.82.114.4 github.com
140.82.113.4 gist.github.com
140.82.113.6 api.github.com
185.199.108.153 assets-cdn.github.com
185.199.109.153 assets-cdn.github.com
185.199.110.153 assets-cdn.github.com
185.199.111.153 assets-cdn.github.com
199.232.96.133 raw.githubusercontent.com
199.232.96.133 gist.githubusercontent.com
199.232.96.133 cloud.githubusercontent.com
199.232.96.133 camo.githubusercontent.com
199.232.96.133 avatars.githubusercontent.com
199.232.96.133 avatars0.githubusercontent.com
199.232.96.133 avatars1.githubusercontent.com
199.232.96.133 avatars2.githubusercontent.com
199.232.96.133 avatars3.githubusercontent.com
199.232.96.133 avatars4.githubusercontent.com
199.232.96.133 avatars5.githubusercontent.com
199.232.96.133 avatars6.githubusercontent.com
199.232.96.133 avatars7.githubusercontent.com
199.232.96.133 avatars8.githubusercontent.com
199.232.96.133 user-images.githubusercontent.com
# GitHub End
访问GITHUB太慢需要修改windows HOST文件的原理是:本机网络设置的 DNS 服务器解析 Github 相关域名到遭受污染的 IP 地址,这些 IP 地址要么本身无法访问,要么节点过远,从而导致了访问失败或者速度缓慢。修改 HOST 文件可以绕过公共 DNS 解析,直接访问 Github 在韩国、日本等的服务器,从而达到加速访问的目的。