國內GitHub訪問下載太慢解決辦法
阿新 • • 發佈:2018-12-26
原因
為什麼慢?github的CDN被某牆屏了。
解決方法
繞過dns解析,在本地直接繫結host,該方法也可加速其他因為CDN被遮蔽導致訪問慢的網站。
實現
在本地host檔案中新增對映,步驟如下:
-
用文字編輯器開啟hosts檔案,位於C:\Windows\System32\drivers\etc目錄下
-
查詢 github.global.ssl.fastly.net 和 assets-cdn.github.com 兩個地址
-
多查幾次,選擇一個穩定,延遲較低的 ip 按如下方式新增到host檔案
-
儲存檔案,重新開啟瀏覽器,起飛。
...... # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost # github 192.30.253.112 assets-cdn.github.com 151.101.88.249 github.global.ssl.fastly.net
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15