查詢ip地址
前往 ipaddress, 查詢以下3個網址對應的ip地址。
github.com
assets-cdn.github.com
github.global.ssl.fastly.net
修改host文件
提示:win記得要用管理員權限的powershell運行,同時默認你裝了vscode。
win
code C:\Windows\System32\drivers\etc\hosts
mac
code /etc/hosts
linux
vim /etc/hosts
加入查詢的結果:
140.82.113.4 github.com
185.199.108.153 assets-cdn.github.com
199.232.69.194 github.global.ssl.fastly.net
刷新dns:
win
- 運行 ipconfig /flushdns 手動刷新系統DNS緩存
mac
- sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say flushed
- 按下enter鍵聽到mac讀出flushed即表明DNS刷新成功
linux
- sudo /etc/init.d/dns-clean
或
- sudo systemctl restart dnsmasq
```