查询网址 ip

打开 ipaddress 网址 https://www.ipaddress.com/

然后查询以下地址的 IP 地址

github.com
assets-cdn.github.com
github.global.ssl.fastly.net

修改 Host

  • windows host 路径:C:\Windows\System32\drivers\etc\hosts
  • Linux host 路径:/etc/hosts

然后添加查询到的 IP 地址,例如:

140.82.114.3 github.com
185.199.108.153 assets-cdn.github.com
185.199.109.153 assets-cdn.github.com
185.199.110.153 assets-cdn.github.com
185.199.111.153 assets-cdn.github.com
199.232.5.194 github.global.ssl.fastly.net

刷新 DNS

  • windows:

    ipconfig /flushdns
  • Linux:

    sudo /etc/init.d/dns-clean start
    sudo /etc/init.d/networking restart