GitHub 访问慢
一、直接使用 GitHub 镜像
https://greasyfork.org/scripts/412245
二、绕过 DNS 解析,配置 hosts 文件直连。
速度取决与服务器和你所在的网络环境,不一定换了就速度快。
DNS 查询网址
国内的解析地址,可以做个对比,解析还是用上面两个:http://119.29.29.29/d?dn=github.com
查询列表
https://github.com/521xueweihan/GitHub520 & https://raw.hellogithub.com/hosts
https://github.com/ineo6/hosts & https://gitlab.com/ineo6/hosts
https://git.yoqi.me/lyq/github-host/raw/master/hosts & https://github.com/jianboy/github-host
按需要来查询,常用的查询前三个就可以了。
# GitHub Start github.com github.global.ssl.fastly.net github-cloud.s3.amazonaws.com gist.github.com assets-cdn.github.com raw.githubusercontent.com gist.githubusercontent.com cloud.githubusercontent.com camo.githubusercontent.com avatars0.githubusercontent.com avatars1.githubusercontent.com avatars2.githubusercontent.com avatars3.githubusercontent.com avatars4.githubusercontent.com avatars5.githubusercontent.com avatars6.githubusercontent.com avatars7.githubusercontent.com avatars8.githubusercontent.com github.githubassets.com status.github.com help.github.com documentcloud.github.com # GitHub End
将查询到的 IP 对应起来写到 hosts 文件
https://github.com/oldj/SwitchHosts
刷新本机 DNS 缓存
保存为 ANSI 编码 .bat 后缀:https://goodcoder666.github.io/post/speed-up-github-access
# 查询 DNS 缓存 ipconfig /displaydns # 清空 DNS 缓存 ipconfig /flushdns # 定时清空 DNS 缓存 @echo off :a ipconfig /flushdns > NUL echo [INFO %time:~0,8%] 已成功刷新 DNS 解析缓存。 echo 1分钟将再次刷新。按下任意键以立即刷新... timeout /t 60 > NUL echo. goto a
chrome 缓存:chrome://net-internals/#dns