引言
- 每次在访问Github网站时,因为是国外网站等多种的问题吧,图裂,加载异常等情况经常不能舒适的白嫖到各种满意的开源代码,由此可以通过以下解决方法…
方法:手动修改hosts文件
文件内容如下:
# GitHub520 Host Start
185.199.108.154 github.githubassets.com
199.232.68.133 camo.githubusercontent.com
199.232.68.133 github.map.fastly.net
199.232.69.194 github.global.ssl.fastly.net
140.82.112.4 github.com
140.82.114.6 api.github.com
199.232.68.133 raw.githubusercontent.com
199.232.68.133 user-images.githubusercontent.com
199.232.68.133 favicons.githubusercontent.com
199.232.68.133 avatars5.githubusercontent.com
199.232.68.133 avatars4.githubusercontent.com
199.232.68.133 avatars3.githubusercontent.com
199.232.68.133 avatars2.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com
199.232.68.133 avatars0.githubusercontent.com
# Star me GitHub url: https://github.com/521xueweihan/GitHub520
# GitHub520 Host End
注:
hosts 文件在每个系统的位置不一,详情如下:
Windows 系统:
C:\Windows\System32\drivers\etc\hosts
Linux 系统:
/etc/hosts
Mac(苹果电脑)系统:
/etc/hosts
Android(安卓)系统:
/system/etc/hosts
iPhone(iOS)系统:
/etc/hosts
修改方法,把第一步的内容复制到文本末尾:
Windows 使用记事本。
Linux、Mac 使用 Root 权限:sudo vi /etc/hosts。
iPhone、iPad 须越狱、Android 必须要 root。
Q.E.D.