1. 改 hosts
先找到 hosts 文件的位置,不同操作系统,hosts 文件的存储位置也不同:
- Windows 系统:
C:\Windows\System32\drivers\etc\hosts
- Linux 系统:
/etc/hosts
- Mac(苹果电脑)系统:
/etc/hosts
- Android(安卓)系统:
/system/etc/hosts
- iPhone(iOS)系统:
/etc/hosts
打开 hosts 文件 ,在最后一行加如下内容:
# GitHub520 Host Start
140.82.112.25 alive.github.com
140.82.112.5 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.113.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.4 gist.github.com
52.217.166.105 github-cloud.s3.amazonaws.com
54.231.135.161 github-com.s3.amazonaws.com
52.217.162.73 github-production-release-asset-2e65be.s3.amazonaws.com
16.182.74.129 github-production-repository-file-5c1aeb.s3.amazonaws.com
52.216.218.121 github-production-user-asset-6210df.s3.amazonaws.com
192.0.66.2 github.blog
140.82.112.3 github.com
140.82.112.17 github.community
185.199.110.154 github.githubassets.com
151.101.193.194 github.global.ssl.fastly.net
185.199.109.153 github.io
185.199.108.133 github.map.fastly.net
185.199.109.153 githubstatus.com
140.82.113.26 live.github.com
185.199.111.133 media.githubusercontent.com
185.199.108.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
140.82.112.21 education.github.com
# Update time: 2024-05-18T14:53:36+08:00
# Update url: https://raw.hellogithub.com/hosts
# Star me: https://github.com/521xueweihan/GitHub520
# GitHub520 Host End
2.设置自动刷新host
下载switchhosts,打开switchhosts,点击+,选择远程,标题随意,url为https://raw.hellogithub.com/hosts ,自动刷新改为1h.如下图所示:
下载switchhosts,参考http://t.csdnimg.cn/W5OSR
详情请看: