1、找到hosts文件
windows :C:\Windows\System32\drivers\etc
2、找到github域名对应的IP :
网址:Website Statistics, Domain WHOIS, DNS Records | IPAddress.com
查询 github.global.ssl.fastly.net和github.com 对应的ip
下面是我查出来的,
140.82.112.3 github.com
199.232.69.194 github.global.ssl.fastly.net
3、ping github.com
未添加hosts时
正在 Ping github.com 具有 32 字节的数据:
请求超时。
请求超时。
请求超时。
请求超时。
4、 增加http://github.global.ssl.fastly.net和http://github.com的映射
在hosts文件中添加
140.82.112.3 github.com
199.232.69.194 github.global.ssl.fastly.net
再次Ping github.com
正在 Ping github.com 具有 32 字节的数据:
来自 140.82.112.3 的回复: 字节=32 时间=233ms TTL=49
来自 140.82.112.3 的回复: 字节=32 时间=239ms TTL=49
来自 140.82.112.3 的回复: 字节=32 时间=231ms TTL=49
来自 140.82.112.3 的回复: 字节=32 时间=245ms TTL=49
140.82.112.3 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 231ms,最长 = 245ms,平均 = 237ms
5、访问github
再次访问github,发现速度简直太快了!完美~