赞
踩
在这之前,我百度和知乎搜了一下这个问题,很多方案过期了,并没有什么卵用。
于是,我在百度搜索结果的基础上,限定时间为一个月内,终于找到一篇有效的方案。
访问慢的原因:国内DNS解析服务器将github.com解析到了新加坡的一个服务器上,所以访问非常慢。
解决方案:修改本地hosts文件,直接访问本地解析的IP
----------------------------------------------------------------------------------------------------------
修改hosts文件,在hosts文件中加入以下内容:
## GitHub Start
192.30.253.112 http://github.com
192.30.253.113 http://github.com
151.101.184.133 http://assets-cdn.github.com
151.101.185.194 http://github.global.ssl.fastly.net
192.30.253.112 http://github.com
192.30.253.113 http://github.com
192.30.253.118 http://gist.github.com
151.101.185.194 http://github.global.ssl.fastly.net
151.101.129.194 http://github.global.ssl.fastly.net
151.101.65.194 http://github.global.ssl.fastly.net
151.101.1.194 http://github.global.ssl.fastly.net
151.101.193.194 http://github.global.ssl.fastly.net
151.101.77.194 http://github.global.ssl.fastly.net
151.101.229.194 http://github.global.ssl.fastly.net
151.101.113.194 http://github.global.ssl.fastly.net
151.101.196.133 http://assets-cdn.github.com
151.101.24.133 http://assets-cdn.github.com
185.199.111.153 http://assets-cdn.github.com
185.199.110.153 http://assets-cdn.github.com
185.199.108.153 http://assets-cdn.github.com
185.199.109.153 http://assets-cdn.github.com
151.101.112.133 http://assets-cdn.github.com
151.101.112.133 http://avatars0.githubusercontent.com
151.101.112.133 http://avatars1.githubusercontent.com
151.101.184.133 http://avatars2.githubusercontent.com
151.101.12.133 http://avatars3.githubusercontent.com
151.101.12.133 http://avatars4.githubusercontent.com
151.101.184.133 http://avatars5.githubusercontent.com
151.101.184.133 http://avatars6.githubusercontent.com
151.101.184.133 http://avatars7.githubusercontent.com
151.101.12.133 http://avatars8.githubusercontent.com
151.101.184.133 http://raw.githubusercontent.com
151.101.112.133 http://gist.githubusercontent.com
151.101.184.133 http://cloud.githubusercontent.com
151.101.112.133 http://camo.githubusercontent.com
52.216.227.168 http://github-cloud.s3.amazonaws.com
192.30.253.112 http://github.com
185.199.108.153 http://assets-cdn.github.com
151.101.185.194 http://github.global.ssl.fastly.net
140.82.113.10 http://codeload.github.com
219.76.4.4 http://github-cloud.s3.amazonaws.com
## GitHub End
----------------------------------------------------------------------------------------------------------
hosts文件所在目录
修改后生效方法(任选其一)
来源:知乎 黄可
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。