1 原理:git
訪問網址時先搜索hosts文件,若是由網址對應的ip則不須要dns域名解析,所以能夠將網址的ip配成靜態ip,減小解析過程,提升訪問速度。github
2 操做:.net
2.1hosts文件最下面增長(win10的位置爲C:\Windows\System32\drivers\etc,先拷到其餘地方修改後再覆蓋該文件夾hosts文件):cdn
192.30.253.113 github.com
185.199.108.153 github.github.io
151.101.72.133 assets-cdn.github.com
151.101.185.194 github.global.ssl.fastly.netdns
2.2 打開cmd console:ip
執行:ipconfig /flushdnsssl
完成。cmd