android开发修改window电脑hosts文件访问github的方法

android开发修改window电脑hosts文件访问github的方法

  1. 笔记本以管理员权限打开C:\Windows\System32\drivers\etc\hosts文件

  2. 添加以下内容到hosts文件

    # hosts文件配置
    185.199.108.154 github.githubassets.com
    199.232.68.133 camo.githubusercontent.com
    199.232.68.133 github.map.fastly.net
    199.232.69.194 github.global.ssl.fastly.net
    140.82.112.3 www.github.com
    140.82.112.4 github.com
    140.82.114.5 api.github.com
    199.232.68.133 raw.githubusercontent.com
    199.232.68.133 favicons.githubusercontent.com
    199.232.68.133 avatars5.githubusercontent.com
    199.232.68.133 avatars4.githubusercontent.com
    199.232.68.133 avatars3.githubusercontent.com
    199.232.68.133 avatars2.githubusercontent.com
    199.232.68.133 avatars1.githubusercontent.com
    199.232.68.133 avatars0.githubusercontent.com
    
  3. 保存成功的话,打开浏览器,正常情况是可以访问github的了

  4. 关于怎么查到这个ip地址的,访问https://www.ipaddress.com/ 这个网站查询的,Top Sites栏目就有github这些常用ip地址,点击进去即可查询到对应ip地址。

posted @ 2021-10-29 14:48  yongfengnice  阅读(91)  评论(0编辑  收藏  举报