筆記本電腦打開Github有時候圖片加載不出來,而台式機則沒有這個問題。Chrome瀏覽器F12進入Network標簽,然后Disable cache之后刷新頁面,發現是幾個avatars5.githubusercontent.com
之類的網頁資源加載失敗了。
最簡單的解決辦法是打開IPAddress.com找到對應的ip地址,然后加入hosts文件。但是由於不止一個網址失敗,這里我想要找到一個更自動化的解決辦法。
參考Github520項目,解決辦法有以下幾種:
- 手動修改hosts文件
- SwitchHosts自動管理
- AdGuard Home自動管理DNS
手動修改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 gist.github.com
185.199.108.153 github.io
140.82.113.4 github.com
140.82.112.5 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
140.82.113.9 codeload.github.com
52.216.128.147 github-cloud.s3.amazonaws.com
52.216.228.96 github-com.s3.amazonaws.com
52.217.93.220 github-production-release-asset-2e65be.s3.amazonaws.com
52.216.12.100 github-production-user-asset-6210df.s3.amazonaws.com
52.216.20.155 github-production-repository-file-5c1aeb.s3.amazonaws.com
# Star me GitHub url: https://github.com/521xueweihan/GitHub520
# GitHub520 Host End
SwitchHosts配置文件
Title: Github
Type: Remote
URL: https://gitee.com/xueweihan/codes/6g793pm2k1hacwfbyesl464/raw?blob_name=GitHub520.yml
Auto Refresh: 1 hour
AdGuard Home自定義DNS封鎖列表
URL: https://gitee.com/xueweihan/codes/6g793pm2k1hacwfbyesl464/raw?blob_name=GitHub520.yml