最新消息:20210917 已从crifan.com换到crifan.org

【已解决】Windows中浏览器打开raw.githubusercontent.com报错: 错误代码 DNS_PROBE_POSSIBLE

raw crifan 809浏览 0评论
折腾:
【未解决】Win中VMWare的macOS安装brew报错:curl 7 Failed to connect to raw.githubusercontent.com port 443 Connection refused
期间,再去主机Win中试试
问题依旧:
显示的是:
错误代码 DNS_PROBE_POSSIBLE
好像是DNS问题??
此处确认不是Trojan的全局代理的问题,此处是自动模式
另外试了,甚至
的根地址都无法访问,问题依旧。
无法显示此网页
错误代码 DNS_PROBE_POSSIBLE
但是win主机中,同样也是能正常打开
的:
所以很是奇怪啊
问题转换为
此处网络,虽然能打开
但是无法打开:
问题是:
无法显示此网页
错误代码 DNS_PROBE_POSSIBLE
raw.githubusercontent.com 错误代码 DNS_PROBE_POSSIBLE
先去彻底退出Trojan代理软件试试,问题依旧。
netsh winsock reset
结果:
C:\Users\xxx>netsh winsock reset
请求的操作需要提升(作为管理员运行)。
结果:
C:\Windows\system32>netsh winsock reset

成功地重置 Winsock 目录。
你必须重新启动计算机才能完成重置。
然后重启Win。
不过即使待会问题没了,也不能确定是否是这个dns的管理解决的。或许是本身重启解决的。。。
raw.githubusercontent.com 访问不了_旺旺的博客-CSDN博客_raw.githubusercontent.com 打不开
“问题:github的raw文件访问不了
简单的说就是域名被DNS污染了
在hosts文件加上:199.232.4.133 raw.githubusercontent.com
这个感觉更像是根本原因
去试试
为什么访问不了以及访问速度会很慢?
GitHub在中国大陆访问速度慢的问题原因有很多,但最直接和最主要的原因是GitHub的分发加速网络的域名遭到DNS污染。
由于GitHub的加速分发CDN域名assets-cdn.github.com遭到DNS污染,导致无法连接使用GitHub的加速分发服务器,才使得中国大陆访问速度很慢。
如何解决DNS污染?
一般的DNS问题都可以通过修改Hosts文件来解决,GitHub的CDN域名被污染问题也不例外,同样可以通过修改Hosts文件解决。
将域名解析直接指向IP地址来绕过DNS的解析,以此解决污染问题。
获取被污染域名的实际IP地址
访问ipaddress.com,使用ip lookup 工具获得相关域名的ip地址。
例如: github.com
可以看到,我查出的域名ip地址为: 192.30.253.112 和 192.30.253.113 (任取一个即可)
修改host文件,在文件中添加一行:
[注] : windows的hosts文件位置为:
C:/windows/system32/drivers/etc/hosts
192.30.253.112 github.com
刷新dns缓存
打开命令行cmd,输入如下命令:
ipconfig /flushdns
此时再刷新页面即可。此时可以正常访问github,但是访问速度还是很慢,我们接着做优化。
Github 访问提速
在hosts文件中继续加入,如下代码:
# GitHub Start
192.30.253.112 
github.com
192.30.253.119 
gist.github.com
151.101.228.133 
assets-cdn.github.com
151.101.228.133 
raw.githubusercontent.com
151.101.228.133 
gist.githubusercontent.com
151.101.228.133 
cloud.githubusercontent.com
151.101.228.133 
camo.githubusercontent.com
151.101.228.133 
avatars0.githubusercontent.com
151.101.228.133 
avatars1.githubusercontent.com
151.101.228.133 
avatars2.githubusercontent.com
151.101.228.133 
avatars3.githubusercontent.com
151.101.228.133 
avatars4.githubusercontent.com
151.101.228.133 
avatars5.githubusercontent.com
151.101.228.133 
avatars6.githubusercontent.com
151.101.228.133 
avatars7.githubusercontent.com
151.101.228.133 
avatars8.githubusercontent.com
192.30.253.116  
api.github.com
# GitHub End
其中可见
的IP是
151.101.228.133
和之前别人给的
199.232.4.133
不一样
所以:
最好还是应该根据方法:去找
实际的IP,再去修改
推荐的dns查询检测工具:
你可对单个域名多查询几次,以挑选稳定且速度较快的ip。
去查查
-》
151.101.228.133
raw.githubusercontent.com”A记录/cname检测结果–Dns查询|dns查询–站长工具
台湾中华电信[海外]
151.101.76.133 [香港 Fastly节点]
然后再去ping看看
C:\Windows\system32>ping 151.101.76.133

正在 Ping 151.101.76.133 具有 32 字节的数据:
来自 151.101.76.133 的回复: 字节=32 时间=106ms TTL=51
来自 151.101.76.133 的回复: 字节=32 时间=116ms TTL=51
来自 151.101.76.133 的回复: 字节=32 时间=109ms TTL=51
速度正常。
可以去设置了
编辑hosts文件
C:\Windows\System32\drivers\etc\hosts
加上内容
# github
151.101.76.133 
raw.githubusercontent.com
注意:要 administrator管理员权限才能修改和保存。
再去刷新
ipconfig /flushdns
log
C:\Windows\system32>ipconfig /flushdns
Windows IP 配置
已成功刷新 DNS 解析缓存。
然后再去试试
win主机中浏览器打开
-》至少可以打开了
然后再去试试
可以打开:
#!/usr/bin/ruby

STDERR.print <<EOS
Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in
Bash. Please migrate to the following command:  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

EOS

Kernel.exec "/bin/bash", "-c", '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"'
即可。
【总结】
此处Windows中,浏览器访问:
结果报错:
错误代码 DNS_PROBE_POSSIBLE
原因:DNS被污染了。
解决办法:
找到raw.githubusercontent.com的IP,加到hosts中。
步骤:
用DNS查询网站:
查询
raw.githubusercontent.com
到最新有效的IP是:
151.101.76.133
再去用
ping 151.101.76.133
确保的确房连接没问题。
再去(用管理员权限)打开
C:\Windows\System32\drivers\etc\hosts
最底部加上:
# github
151.101.76.133 raw.githubusercontent.com
保存后。
想要立刻使得其生效可以:
ipconfig /flushdns
或直接重启Win。即可。
然后即可正常访问:
raw.githubusercontent.com
的网站了:
https://raw.githubusercontent.com/Homebrew/install/master/install

转载请注明:在路上 » 【已解决】Windows中浏览器打开raw.githubusercontent.com报错: 错误代码 DNS_PROBE_POSSIBLE

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
90 queries in 0.189 seconds, using 23.33MB memory