加速访问github方法

查询TTL值越大的ip

  1. 访问http://tool.chinaz.com/dns/

  2. 查询以下域名映射,并分别取访问速度较快的一个ip

github.global.ssl.fastly.net -> 66.249.89.104
assets-cdn.github.com -> 203.208.39.99

TTL值越大证明响应速度越快(“TTL”的值越大越好才对,因为“TTL”的值越大,说明发送数据包经过路由器越少,而经过路由器越少,说明越快到达目的地,速度当然也就越快。)
在这里插入图片描述

添加到hosts里

将查询到的ip和域名设置到host中
【windows】
C:\Windows\System32\drivers\etc

【linux】
vim /etc/hosts
在hosts中加入查询结果

140.82.112.4 github.com
140.82.113.3 gist.github.com
185.199.108.153 assets-cdn.github.com
199.232.68.133 raw.githubusercontent.com
199.232.68.133 gist.githubusercontent.com
199.232.68.133 cloud.githubusercontent.com
151.101.192.133 camo.githubusercontent.com
199.232.68.133 avatars0.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com
199.232.68.133 avatars2.githubusercontent.com
199.232.68.133 avatars3.githubusercontent.com
199.232.68.133 avatars4.githubusercontent.com
199.232.68.133 avatars5.githubusercontent.com
199.232.68.133 avatars6.githubusercontent.com
199.232.68.133 avatars7.githubusercontent.com
199.232.68.133 avatars8.githubusercontent.com

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐