目录
一、复制Github的服务器地址
二、打开C盘下的hosts配置文件
三、编辑hosts
四、刷新DNS
五、本教程资源来源
一、复制以下Github的各服务器地址
# GitHub520 Host Start
140.82.112.26 alive.github.com
140.82.113.6 api.github.com
185.199.109.153 assets-cdn.github.com
185.199.111.133 avatars.githubusercontent.com
185.199.111.133 avatars0.githubusercontent.com
185.199.111.133 avatars1.githubusercontent.com
185.199.111.133 avatars2.githubusercontent.com
185.199.111.133 avatars3.githubusercontent.com
185.199.111.133 avatars4.githubusercontent.com
185.199.111.133 avatars5.githubusercontent.com
185.199.111.133 camo.githubusercontent.com
140.82.112.22 central.github.com
185.199.111.133 cloud.githubusercontent.com
140.82.114.10 codeload.github.com
140.82.114.21 collector.github.com
185.199.111.133 desktop.githubusercontent.com
185.199.111.133 favicons.githubusercontent.com
140.82.112.3 gist.github.com
54.231.201.97 github-cloud.s3.amazonaws.com
52.217.123.73 github-com.s3.amazonaws.com
16.182.98.169 github-production-release-asset-2e65be.s3.amazonaws.com
16.182.35.225 github-production-repository-file-5c1aeb.s3.amazonaws.com
52.216.114.99 github-production-user-asset-6210df.s3.amazonaws.com
192.0.66.2 github.blog
140.82.114.4 github.com
140.82.112.17 github.community
185.199.111.154 github.githubassets.com
151.101.193.194 github.global.ssl.fastly.net
185.199.109.153 github.io
185.199.111.133 github.map.fastly.net
185.199.109.153 githubstatus.com
140.82.112.26 live.github.com
185.199.111.133 media.githubusercontent.com
185.199.111.133 objects.githubusercontent.com
13.107.42.16 pipelines.actions.githubusercontent.com
185.199.111.133 raw.githubusercontent.com
185.199.111.133 user-images.githubusercontent.com
13.107.213.40 vscode.dev
140.82.114.21 education.github.com
# Update time: 2024-04-26T08:19:25+08:00
# Update url: https://raw.hellogithub.com/hosts
# Star me: https://github.com/521xueweihan/GitHub520
# GitHub520 Host End
二、打开C盘下的hosts配置文件
- Windows 系统:
C:\Windows\System32\drivers\etc\hosts
- Linux 系统:
/etc/hosts
- Mac(苹果电脑)系统:
/etc/hosts
- Android(安卓)系统:
/system/etc/hosts
- iPhone(iOS)系统:
/etc/hosts
三、编辑hosts
鼠标右键 => 打开方式 => 用记事本打开,或者用开发的编辑器打开
将上面的代码复制到hosts文件的底部,Ctrl + S 保存一下
四、刷新DNS
按键盘的win键,输入CMD,打开命令行终端,输入 ipconfig /flushdns
,将刚刚配置Github服务器地址更新一下。
刷新网页重新访问Github,如果无效重启试试。
没了,以上操作非常简单。
五、本教程资源来源
除了这种方案,其实还有另外一种方案,详情请看 https://github.com/521xueweihan/GitHub520