首页 > 技术文章 > GitHub 访问慢

jhxxb 2019-06-10 09:53 原文

一、直接使用 GitHub 镜像

https://github.com.cnpmjs.org

https://hub.fastgit.org

https://gitclone.com

https://www.library.ac.cn

https://hunsh.net/archives/23

https://greasyfork.org/scripts/412245

 

二、绕过 DNS 解析,配置 hosts 文件直连。

速度取决与服务器和你所在的网络环境,不一定换了就速度快。

 

DNS 查询网址

https://www.ipaddress.com

https://tool.chinaz.com/dns

https://site.ip138.com

https://dns.google

国内的解析地址,可以做个对比,解析还是用上面两个:http://119.29.29.29/d?dn=github.com

 

查询列表

GitHub520:https://github.com/521xueweihan/GitHub520 & https://raw.hellogithub.com/hosts

https://gitee.com/ineo6/hosts/raw/master/next-hosts

https://git.yoqi.me/lyq/github-host/raw/master/hosts & https://github.com/jianboy/github-host

https://gitee.com/isevenluo/github-hosts/raw/master/hosts

按需要来查询,常用的查询前三个就可以了。

# 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 缓存

# Windows

# 查询本机 DNS 缓存
ipconfig /displaydns

# 清空本机 DNS 缓存
ipconfig /flushdns

chrome 缓存:chrome://net-internals/#dns

 


https://qu.js.cn/how-to-speed-github

https://pangniao.net/github-cdn.html

https://github.com/StevenBlack/hosts

推荐阅读