0x00 前言
这几天刚刚将github图床和微信图床的功能添加进vnote里面, 结果发现 github 图片显示不出来了
研究了一波发现, 竟然是GitHub的raw.githubusercontent.com
域名解析因为某种不可描述的原因给污染了
难道只能以后只能使用科学上网, 才能用得了 github 图床?
0x01 查到真正的ip
通过 IPAddress.com
: https://www.ipaddress.com/ 首页, 输入raw.githubusercontent.com
查询到真实IP地址
好了, raw.githubusercontent.com
的真实ip已经拿到了, 接下来就是为所欲为了!
0x02 修改hosts
没错, 就是修改大名鼎鼎的hosts
文件啦~~
我管你污不污染, 我只按照自己需求来, 我就是我
windows
-
鼠标右键点击桌面左下角的开始菜单,选择
Windows PowerShell(管理员)
-
在打开的 Powershell 窗口中输入
notepad
, 回车, 则会打开记事本 -
打开的记事本页面中, 选择
文件
->打开
-
在弹出的文件选择窗口中, 选择
drivers
->etc
->hosts
-
添加以下内容保存即可
除了找出
raw.githubusercontent.com
的ip之外,还有其他被墙的也一并查出来。192.30.253.112 github.com 192.30.253.118 gist.github.com 199.232.28.133 assets-cdn.github.com 199.232.28.133 raw.githubusercontent.com 199.232.28.133 gist.githubusercontent.com 199.232.28.133 cloud.githubusercontent.com 199.232.28.133 camo.githubusercontent.com 199.232.28.133 user-images.githubusercontent.com 199.232.28.133 avatars0.githubusercontent.com 199.232.28.133 avatars1.githubusercontent.com 199.232.28.133 avatars2.githubusercontent.com 199.232.28.133 avatars3.githubusercontent.com 199.232.28.133 avatars4.githubusercontent.com 199.232.28.133 avatars5.githubusercontent.com 199.232.28.133 avatars6.githubusercontent.com 199.232.28.133 avatars7.githubusercontent.com 199.232.28.133 avatars8.githubusercontent.com
linux/mac
直接打开终端, 输入以下命令编辑hosts
文件
sudo vim /etc/hosts
添加以下内容保存即可
192.30.253.112 github.com
192.30.253.118 gist.github.com
199.232.28.133 assets-cdn.github.com
199.232.28.133 raw.githubusercontent.com
199.232.28.133 gist.githubusercontent.com
199.232.28.133 cloud.githubusercontent.com
199.232.28.133 camo.githubusercontent.com
199.232.28.133 avatars0.githubusercontent.com
199.232.28.133 avatars1.githubusercontent.com
199.232.28.133 avatars2.githubusercontent.com
199.232.28.133 avatars3.githubusercontent.com
199.232.28.133 avatars4.githubusercontent.com
199.232.28.133 avatars5.githubusercontent.com
199.232.28.133 avatars6.githubusercontent.com
199.232.28.133 avatars7.githubusercontent.com
199.232.28.133 avatars8.githubusercontent.com
0x03 后记
希望我大中华尽快取消对 raw.githubusercontent.com
域名的污染吧~~
版权属于:江南小虫虫
本文链接:https://fengwenhua.top/index.php/archives/28/
转载时须注明出处及本声明
2 条评论
查了很多解决办法,这个是最详细的,已经成功了
非常非常完美