GitHub加速篇~~
GitHub在国内打开很慢,甚至打不开,这都是因为他是国外站;目前互联网的连接机制导致超过一定的路由节点的连接就会出现这个问题,解决办法就是直接告诉本机ip。不要先层层询问域名转ip,这样速度和连接的速度都可以进一步的大副提升,所以将下面的内容帖到本机的hosts文件中,就能大幅度提速,并且打不开的也会打开!具体步骤见下面。
windows下路径为:C:\\Windows\\System32\\drivers\\etc\\hosts
Linux下路径:/etc/hosts
<code># GitHub Start
192.30.253.112 github.com
192.30.253.119 gist.github.com
151.101.100.133 assets-cdn.github.com
151.101.100.133 raw.githubusercontent.com
151.101.100.133 gist.githubusercontent.com
151.101.100.133 cloud.githubusercontent.com
151.101.100.133 camo.githubusercontent.com
151.101.100.133 avatars0.githubusercontent.com
151.101.100.133 avatars1.githubusercontent.com
151.101.100.133 avatars2.githubusercontent.com
151.101.100.133 avatars3.githubusercontent.com
151.101.100.133 avatars4.githubusercontent.com
151.101.100.133 avatars5.githubusercontent.com
151.101.100.133 avatars6.githubusercontent.com
151.101.100.133 avatars7.githubusercontent.com
151.101.100.133 avatars8.githubusercontent.com
# GitHub End/<code>
目前截止到2020.3.22,上面这个GitHub代理加载不出图片,因此需要更新到最新的代理,新的代理我也贴出来了。
<code># GitHub Start
192.30.253.112 github.com
192.30.253.119 gist.github.com
151.101.184.133 assets-cdn.github.com
151.101.184.133 raw.githubusercontent.com
151.101.184.133 gist.githubusercontent.com
151.101.184.133 cloud.githubusercontent.com
151.101.184.133 camo.githubusercontent.com
151.101.184.133 avatars0.githubusercontent.com
151.101.184.133 avatars1.githubusercontent.com
151.101.184.133 avatars2.githubusercontent.com
151.101.184.133 avatars3.githubusercontent.com
151.101.184.133 avatars4.githubusercontent.com
151.101.184.133 avatars5.githubusercontent.com
151.101.184.133 avatars6.githubusercontent.com
151.101.184.133 avatars7.githubusercontent.com
151.101.184.133 avatars8.githubusercontent.com
# GitHub End/<code>
如果出现编辑完host文件没有权限保存,那么可以按照下面几个步骤解决:
1、win+R
2、进入hosts的文件所在目录,点击‘’文件‘’按钮
3、点击Windows PowerShell ,在点击以管理员身份打开
4、弹出一个窗口,输入 cmd 并回车,就进入了管理员界面。输入命令行:notepad hosts 并回车
5、打开了hosts,然后就可以执行复制粘贴等编辑操作了
閱讀更多 superBoyJack 的文章