class="hljs-ln-code"> class="hljs-ln-line">140.82.114.6 api.github.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="3"> class="hljs-ln-code"> class="hljs-ln-line">185.199.109.153 assets-cdn.github.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="4"> class="hljs-ln-code"> class="hljs-ln-line">185.199.111.133 avatars.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="5"> class="hljs-ln-code"> class="hljs-ln-line">185.199.111.133 avatars0.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="6"> class="hljs-ln-code"> class="hljs-ln-line">185.199.108.133 avatars1.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="7"> class="hljs-ln-code"> class="hljs-ln-line">185.199.108.133 avatars2.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="8"> class="hljs-ln-code"> class="hljs-ln-line">185.199.108.133 avatars3.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="9"> class="hljs-ln-code"> class="hljs-ln-line">185.199.109.133 avatars4.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="10"> class="hljs-ln-code"> class="hljs-ln-line">185.199.108.133 avatars5.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="11"> class="hljs-ln-code"> class="hljs-ln-line">185.199.108.133 camo.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="12"> class="hljs-ln-code"> class="hljs-ln-line">140.82.113.21 central.github.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="13"> class="hljs-ln-code"> class="hljs-ln-line">185.199.108.133 cloud.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="14"> class="hljs-ln-code"> class="hljs-ln-line">140.82.112.10 codeload.github.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="15"> class="hljs-ln-code"> class="hljs-ln-line">140.82.112.21 collector.github.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="16"> class="hljs-ln-code"> class="hljs-ln-line">185.199.110.133 desktop.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="17"> class="hljs-ln-code"> class="hljs-ln-line">185.199.108.133 favicons.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="18"> class="hljs-ln-code"> class="hljs-ln-line">140.82.112.4 gist.github.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="19"> class="hljs-ln-code"> class="hljs-ln-line">52.216.8.67 github-cloud.s3.amazonaws.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="20"> class="hljs-ln-code"> class="hljs-ln-line">52.217.197.113 github-com.s3.amazonaws.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="21"> class="hljs-ln-code"> class="hljs-ln-line">52.217.67.108 github-production-release-asset-2e65be.s3.amazonaws.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="22"> class="hljs-ln-code"> class="hljs-ln-line">16.182.99.153 github-production-repository-file-5c1aeb.s3.amazonaws.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="23"> class="hljs-ln-code"> class="hljs-ln-line">52.216.154.52 github-production-user-asset-6210df.s3.amazonaws.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="24"> class="hljs-ln-code"> class="hljs-ln-line">192.0.66.2 github.blog class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="25"> class="hljs-ln-code"> class="hljs-ln-line">140.82.113.3 github.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="26"> class="hljs-ln-code"> class="hljs-ln-line">140.82.113.18 github.community class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="27"> class="hljs-ln-code"> class="hljs-ln-line">185.199.109.154 github.githubassets.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="28"> class="hljs-ln-code"> class="hljs-ln-line">151.101.193.194 github.global.ssl.fastly.net class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="29"> class="hljs-ln-code"> class="hljs-ln-line">185.199.109.153 github.io class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="30"> class="hljs-ln-code"> class="hljs-ln-line">185.199.111.133 github.map.fastly.net class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="31"> class="hljs-ln-code"> class="hljs-ln-line">185.199.109.153 githubstatus.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="32"> class="hljs-ln-code"> class="hljs-ln-line">140.82.114.25 live.github.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="33"> class="hljs-ln-code"> class="hljs-ln-line">185.199.108.133 media.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="34"> class="hljs-ln-code"> class="hljs-ln-line">185.199.108.133 objects.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="35"> class="hljs-ln-code"> class="hljs-ln-line">13.107.42.16 pipelines.actions.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="36"> class="hljs-ln-code"> class="hljs-ln-line">185.199.108.133 raw.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="37"> class="hljs-ln-code"> class="hljs-ln-line">185.199.111.133 user-images.githubusercontent.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="38"> class="hljs-ln-code"> class="hljs-ln-line">140.82.114.22 education.github.com class="hljs-ln-numbers"> class="hljs-ln-line hljs-ln-n" data-line-number="39"> class="hljs-ln-code"> class="hljs-ln-line">185.199.108.133 private-user-images.githubusercontent.com class="hljs-button signin active add_def" data-title="登录复制" data-report-click="{"spm":"1001.2101.3001.4334"}" onclick="hljs.signin(event)">
(注:如果有小伙伴显示修改报错一般是权限问题,可以直接把文件拉在电脑桌面上修改,修改完后拉进去就好 )
3、 更新dns缓存
修改后会直接生效,无需刷新 DNS 缓存,因为 hosts 的优先级大于 DNS 域名解析,添加完 hosts 之后,再访问对应的域名,已经就与 DNS 没关系了。如果未生效,重启操作系统或用命令刷新。
Windows 系统:ipconfig /flushdns
Linux 系统:systemctl restart nscd
Mac 系统:sudo dscacheutil -flushcache或sudo killall -HUP mDNSResponder
!!!!如果以上域名添加后仍然无法使用,建议重新查找域名添加
4、自动更新hosts(进阶版本对于需要长期访问Github的小伙伴)
推荐 SwitchHosts 工具管理 hosts
下载Release SwitchHosts v4.2.0 · oldj/SwitchHosts · GitHub(建议完成后具体操作后下载)
评论记录:
回复评论: