vernesong / OpenClash

A Clash Client For OpenWrt
MIT License
16.96k stars 3.12k forks source link

最新版本日志出现:【/tmp/openclash_last_version】下载失败 #2791

Closed sachikomakino closed 1 year ago

sachikomakino commented 1 year ago

Verify Steps

OpenClash Version

v0.45.70-beta

Bug on Environment

Official OpenWrt

Bug on Platform

Linux-amd64(x86-64)

To Reproduce

启动后每过一段时间日志就会出现报错

Describe the Bug

刚更新完最新版本出现以上的提示,链接好像暂时没问题,请问大神这个错误是什么意思,需要如何修复。

OpenClash Log

2022-11-07 10:12:13【/tmp/clash_last_version】下载失败:【how to fix it, please visit the web page mentioned above.】 2022-11-07 10:12:13【/tmp/clash_last_version】下载失败:【establish a secure connection to it. To learn more about this situation and】 2022-11-07 10:12:13【/tmp/clash_last_version】下载失败:【curl failed to verify the legitimacy of the server and therefore could not】 2022-11-07 10:12:13【/tmp/clash_last_version】下载失败:【】 2022-11-07 10:12:13【/tmp/clash_last_version】下载失败:【More details here: https://curl.se/docs/sslcerts.html】 2022-11-07 10:12:13【/tmp/clash_last_version】下载失败:【curl: (60) Cert verify failed: BADCERT_CN_MISMATCH】 2022-11-07 10:10:57【/tmp/openclash_last_version】下载失败:【how to fix it, please visit the web page mentioned above.】 2022-11-07 10:10:57【/tmp/openclash_last_version】下载失败:【establish a secure connection to it. To learn more about this situation and】 2022-11-07 10:10:57【/tmp/openclash_last_version】下载失败:【curl failed to verify the legitimacy of the server and therefore could not】 2022-11-07 10:10:57【/tmp/openclash_last_version】下载失败:【】 2022-11-07 10:10:57【/tmp/openclash_last_version】下载失败:【More details here: https://curl.se/docs/sslcerts.html】 2022-11-07 10:10:57【/tmp/openclash_last_version】下载失败:【curl: (60) Cert verify failed: BADCERT_CN_MISMATCH】 2022-11-07 09:26:43【/tmp/clash_last_version】下载失败:【how to fix it, please visit the web page mentioned above.】 2022-11-07 09:26:43【/tmp/clash_last_version】下载失败:【establish a secure connection to it. To learn more about this situation and】 2022-11-07 09:26:43【/tmp/clash_last_version】下载失败:【curl failed to verify the legitimacy of the server and therefore could not】 2022-11-07 09:26:43【/tmp/clash_last_version】下载失败:【】 2022-11-07 09:26:43【/tmp/clash_last_version】下载失败:【More details here: https://curl.se/docs/sslcerts.html】 2022-11-07 09:26:43【/tmp/clash_last_version】下载失败:【curl: (60) Cert verify failed: BADCERT_CN_MISMATCH】 2022-11-07 09:26:43 第二步: 组件运行前检查... 2022-11-07 09:26:43 第一步: 获取配置... 2022-11-07 09:26:43 OpenClash 开始启动... 2022-11-07 09:26:43 第六步:删除 OpenClash 残留文件... 2022-11-07 09:26:43 第五步: 重启 Dnsmasq 程序... 2022-11-07 09:26:43 第四步: 关闭 Clash 主程序... 2022-11-07 09:26:43 第三步: 关闭 OpenClash 守护程序... 2022-11-07 09:26:42 第二步: 删除 OpenClash 防火墙规则... 2022-11-07 09:26:42 第一步: 备份当前策略组状态... 2022-11-07 09:26:42 OpenClash 开始关闭... 2022-11-07 09:26:31 OpenClash 更新成功,即将进行重启!

OpenClash Config

No response

Expected Behavior

请问如何修复,谢谢。

Screenshots

No response

a904055262 commented 1 year ago

同样出现

thisdk commented 1 year ago

同样的问题.我是v0.45.71-beta

wxy1343 commented 1 year ago

看看raw.githubusercontent.com有没有解析正常

warcns commented 1 year ago

2022-11-13 22:36:21【/tmp/openclash_last_version】下载失败:【curl: (28) Operation timed out after 10001 milliseconds with 0 bytes received】 2022-11-13 19:51:03【/tmp/openclash_last_version】下载失败:【curl: (28) Operation timed out after 10001 milliseconds with 0 bytes received】

是的,每隔一段时间就会提示这个错误。

onlyLTY commented 1 year ago

我也一样

2022-11-14 00:52:28 【TUN】版本内核更新成功!
2022-11-14 00:52:28 【TUN】版本内核下载成功,开始更新...
2022-11-14 00:51:28【/tmp/clash_tun.gz】下载失败:【curl: (28) Operation timed out after 30000 milliseconds with 2326528 out of 4692235 bytes received】
2022-11-14 00:51:28【/tmp/clash_tun.gz】下载失败:【how to fix it, please visit the web page mentioned above.】
2022-11-14 00:51:28【/tmp/clash_tun.gz】下载失败:【establish a secure connection to it. To learn more about this situation and】
2022-11-14 00:51:28【/tmp/clash_tun.gz】下载失败:【curl failed to verify the legitimacy of the server and therefore could not】
2022-11-14 00:51:28【/tmp/clash_tun.gz】下载失败:【】
2022-11-14 00:51:28【/tmp/clash_tun.gz】下载失败:【More details here: https://curl.se/docs/sslcerts.html】
2022-11-14 00:51:28【/tmp/clash_tun.gz】下载失败:【curl: (60) SSL certificate problem: self signed certificate】
2022-11-14 00:51:28 【TUN】版本内核正在下载,如下载失败请尝试手动下载并上传...
2022-11-14 00:51:26【/tmp/clash_last_version】下载失败:【how to fix it, please visit the web page mentioned above.】
2022-11-14 00:51:26【/tmp/clash_last_version】下载失败:【establish a secure connection to it. To learn more about this situation and】
2022-11-14 00:51:26【/tmp/clash_last_version】下载失败:【curl failed to verify the legitimacy of the server and therefore could not】
2022-11-14 00:51:26【/tmp/clash_last_version】下载失败:【】
2022-11-14 00:51:26【/tmp/clash_last_version】下载失败:【More details here: https://curl.se/docs/sslcerts.html】
2022-11-14 00:51:26【/tmp/clash_last_version】下载失败:【curl: (60) SSL certificate problem: self signed certificate】
2022-11-14 00:51:26 提示: 检测到内核文件不存在,准备开始下载...
2022-11-14 00:51:25 第二步: 组件运行前检查...
2022-11-14 00:51:25 第一步: 获取配置...
2022-11-14 00:51:25 OpenClash 开始启动...
vernesong commented 1 year ago

直连污染导致的 image

warcns commented 1 year ago

直连污染导致的 image

我把Github 地址修改设置为 https://fastly.jsdelivr.net/ 应用之后当时就上不了外网了。。。 折腾了半天,恢复初始设置啥的都不行,最终重启路由器后重新配置了OpenClash才回来。。。

vernesong commented 1 year ago

选cf那个试试

warcns commented 1 year ago

选cf那个试试

谢了,我还是取消路由器直连吧,我怕整不好,还得再重装一次openclash😅

dannyge commented 1 year ago

可以尝试修改一下/usr/share/openclash 下面几个shell中的curl超时时间,例如:/usr/share/openclash/openclash_chnroute.sh

curl -SsL --connect-timeout 5 -m 30 --speed-time 15 --speed-limit 1 --retry 2 https://ispip.clang.cn/all_cn.txt -o /tmp/china_ip_route.txt 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:      %S")" -v file="/tmp/china_ip_route.txt" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"

--connect-timeout 5 修改成 --connect-timeout 50 (相关的文件和位置可以参照:https://github.com/vernesong/OpenClash/search?l=Shell&q=%22+--connect-timeout+5%22 去修改)

benjiamin2014 commented 1 year ago

直连污染导致的

image

抱歉,请问以上的设置是在哪里的?我没找到

dannyge commented 1 year ago

直连污染导致的 image

抱歉,请问以上的设置是在哪里的?我没找到

@benjiamin2014 全局设置-->基本设置

CoolFeiFei commented 1 year ago

直连污染导致的 image

请问这里的github下拉框选哪一个

CoolFeiFei commented 1 year ago

选cf那个试试

没找到带cf的选项

warcns commented 1 year ago

选cf那个试试

没找到带cf的选项

说的应该是 testingcf.jsdelivr.net

CoolFeiFei commented 1 year ago

选cf那个试试

没找到带cf的选项

说的应该是 testingcf.jsdelivr.net

ok谢谢但是试了还是不行

warcns commented 1 year ago

选cf那个试试

没找到带cf的选项

说的应该是 testingcf.jsdelivr.net

ok谢谢但是试了还是不行

是的,换完还是提示下载失败的错误。

CoolFeiFei commented 1 year ago

选cf那个试试

没找到带cf的选项

说的应该是 testingcf.jsdelivr.net

ok谢谢但是试了还是不行

是的,换完还是提示下载失败的错误。

我刚刚突然可以了,换完刷新了一下

blacktea17 commented 1 year ago

可以尝试修改一下/usr/share/openclash 下面几个shell中的curl超时时间,例如:/usr/share/openclash/openclash_chnroute.sh

curl -SsL --connect-timeout 5 -m 30 --speed-time 15 --speed-limit 1 --retry 2 https://ispip.clang.cn/all_cn.txt -o /tmp/china_ip_route.txt 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:      %S")" -v file="/tmp/china_ip_route.txt" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"

--connect-timeout 5 修改成 --connect-timeout 50 (相关的文件和位置可以参照:https://github.com/vernesong/OpenClash/search?l=Shell&q=%22+--connect-timeout+5%22 去修改)

的确可行 但是版本更新后 这些文件都会被更新 又得重来一次 太费力了

dannyge commented 1 year ago

可以尝试修改一下/usr/share/openclash 下面几个shell中的curl超时时间,例如:/usr/share/openclash/openclash_chnroute.sh

curl -SsL --connect-timeout 5 -m 30 --speed-time 15 --speed-limit 1 --retry 2 https://ispip.clang.cn/all_cn.txt -o /tmp/china_ip_route.txt 2>&1 | awk -v time="$(date "+%Y-%m-%d %H:%M:      %S")" -v file="/tmp/china_ip_route.txt" '{print time "【" file "】Download Failed:【"$0"】"}' >> "$LOG_FILE"

--connect-timeout 5 修改成 --connect-timeout 50 (相关的文件和位置可以参照:https://github.com/vernesong/OpenClash/search?l=Shell&q=%22+--connect-timeout+5%22 去修改)

的确可行 但是版本更新后 这些文件都会被更新 又得重来一次 太费力了

@vernesong 有可能把shell脚本里的curl超时时间延长一些吗?

hyh1750522171 commented 1 year ago

兄弟们,github本来就很难访问还给梯子用github???

Yunak commented 1 year ago

dns污染严重没有办法,临时解决就是 搜一下raw.githubusercontent.com 的 ip 手动加在/etc/hosts ,这样就没有问题了,clash正常后把这个host记录删掉就行 image

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

jacobin commented 1 year ago

这个问题又出现了: 2023-02-16 20:07:00【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-16 19:17:19【/tmp/openclash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-16 19:17:19【/tmp/openclash_last_version】下载失败:【curl: (28) Operation timed out after 10001 milliseconds with 0 out of 0 bytes received】 2023-02-16 19:17:19【/tmp/openclash_last_version】下载失败:【curl: (28) Operation timed out after 10001 milliseconds with 0 out of 0 bytes received】 2023-02-16 19:17:18【/tmp/openclash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x7280) SSL - The connection indicated an EOF】 2023-02-16 17:26:25【/tmp/openclash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x7280) SSL - The connection indicated an EOF】 2023-02-16 17:26:25【/tmp/openclash_last_version】下载失败:【curl: (28) Operation timed out after 10000 milliseconds with 0 out of 0 bytes received】 2023-02-16 17:26:22【/tmp/openclash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x7280) SSL - The connection indicated an EOF】 2023-02-16 16:19:17【/tmp/openclash_last_version】下载失败:【curl: (28) Operation timed out after 10000 milliseconds with 0 out of 0 bytes received】 2023-02-16 16:19:11【/tmp/openclash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x7280) SSL - The connection indicated an EOF】 2023-02-16 15:25:14 OpenClash 启动成功,请等待服务器上线!

jacobin commented 1 year ago

2023-02-23 00:42:52【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:47【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:42【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:41【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:39【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:38【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:36【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:35【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:33【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:32【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:29【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:24【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:22【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:21【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:19【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:18【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:16【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:15【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:13【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:12【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:42:02【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:41:57【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:41:37【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:41:37【/tmp/clash_last_version】下载失败:【curl: (28) Operation timed out after 10000 milliseconds with 0 out of 0 bytes received】 2023-02-23 00:41:36【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:41:26【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:41:21【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:41:13【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:41:08【/tmp/clash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】 2023-02-23 00:40:21【/tmp/openclash_last_version】下载失败:【curl: (35) ssl_handshake returned - mbedTLS: (-0x0050) NET - Connection was reset by peer】

jacobin commented 1 year ago

歇斯底里的,这条日志是几个意思?下载clash的最新版本?每次出现这日志,我的系统的上网就开始有状况 ... ... ...

ghost commented 1 year ago

是不是只有我们这些人会遇到这些问题??? 其他人都没有这种问题?? 为什么从去年11月反馈的问题 到现在都还在 ,一直刷 last version 下载失败, 一直重置防火墙 一直造成断网死机。 真的吐了。也没有解决方案。

thisdk commented 1 year ago

其实直到现在我都还有这个问题.只不过我有办法让它变正常...甚至知道什么原因 原因是因为开了fake-ip模式.开启了这个模式后.路由器的部分插件会失效.比如aliyun-webdav..

解决办法是 找到 -> 自定义 Fake-IP-Filter

添加

阿里

.aliyundrive.com .aliyundrive.net

插件

*.jsdelivr.net ........ 那些geoip,geosite的好像是别的网站.都添加上去.就行了

看到哪里报错.从源码找到下载的域名,添加到这里.甚至别的插件使用失效.也可以把URL添加到这里

ghost commented 1 year ago

然而我用的并不是fake ip 我用的是Redir-Host TUN模式出现过 兼容模式也出现了。 我的N1 openwrt 一共使用了3个功能 一个openclash 一个 alist 一个 zoretire。 没了。 你说的阿里云webdav失效,在redir host 下面不存在这个问题, 因为前几天 alist被阿里云打的时候 我就用了一天的 aliyun webdav。 没有失效的问题。 最常出现的是 重置openclash防火墙 时不时就重置 ,重置就会断魔法十几秒, 没过多久就死机了。

thisdk commented 1 year ago

如果你开了了fake-ip模式.aliyun-webdav甚至登录都不成功.

vernesong commented 1 year ago

重置防火墙是被动行为,因为防火墙被其他插件重启了才会有这个日志

jacobin commented 1 year ago

谢谢提醒。我到OpenWRT控制台上查看,确实有两个不是我愿意开启的插件在运行。也许就是它们搞的鬼。但愿。

dycwuxing commented 1 year ago

直连污染导致的 image

我在点击-版本更新-当前客户端版本更新的时候观察了下 感觉并不是污染导致 我设置了如下规则,路由器勾选了"本机代理"

DNS返回IP如下: image

yard面板中开启了debug显示,但是都查不到有关github的信息 image image

dycwuxing commented 1 year ago

感觉好像github就没有经过clash一样....不太懂,不知道理解的对不对

wdcew commented 1 year ago

出现这个问题的根本原因是 curl 在下载相关的文件时, 连接超时, 一般是因为 连接 GitHub 超时,所以你要进行一下判断

  1. 本身电脑能否直连 GitHub网站,一般因为域名污染, 都无法直连接,所以推荐在全局设置-->基本设置 中修改 github 地址为另外的地址: 如cdn.jsdelivr.net image 2.将 *.jsdelivr.net 加入 忽略探测(嗅探)的域名(sni)列表(如果你开启嗅探功能的话) 3.将 - DOMAIN-KEYWORD,jsdelivr.net,DIRECT 加入你的配置文件中, 保证 jsdelivr.net域名 一直都是直连
  2. 如果执意要从 Github 下载相关文件, 请将 Github 相关域名加入相关代理列表中, 并且保证节点可用, 不然 curl 无法从 GitHub 下载相关文件, 从而报错.(一般都是因为节点无法使用,进而无法下载相关文件报错) 总之是 路由器本身网络的问题, 请确保网络正常和节点正常使用的情况下,开启openclash.基本上就不会报错了
ghost commented 1 year ago

githubusercontent.com本来就是被墙的域名,不知道为什么要这样设置下载,本来要翻墙的,结果先被墙。可以自己翻墙下载,但是也没说清应该自己去哪里下载,然后安装放到哪个目录,哎。

jacobin commented 1 year ago

我的困惑不在于它能不能下载,而在于它为何要锲而不舍拧巴倔强的非下载不可。这个倔强的下载只是个结果啦,原因在于,这个时候,路由器上网都有了问题。

这种莫名其妙要去拉个“/tmp/clash_last_version”的行为也是很让人恶心的,莫名其妙,无中生有,令人生疑

ghost commented 1 year ago

我的困惑不在于它能不能下载,而在于它为何要锲而不舍拧巴倔强的非下载不可。这个倔强的下载只是个结果啦,原因在于,这个时候,路由器上网都有了问题。

这种莫名其妙要去拉个“/tmp/clash_last_version”的行为也是很让人恶心的,莫名其妙,无中生有,令人生疑

界面上是在 插件设置--版本更新 里面有要下载的地址和需要安装的位置,自己挨个找的,我已经决定还是自己写脚本了,其实就是透明代理和一个简单规则,我需要的不多,这些luci-app都只是适用于一定范围的,有些插件还不让提bug比如那个passwall的现任作者。

grayguest commented 1 year ago

目前在用x86最新版,在配置订阅自定义模板ini的时候,如果选择github上面的,会有一定机率失败,大部分使用是在无代理情况下能更新订阅成功。 附日志

2023-03-31 11:15:40 配置文件【config】没有更新,停止继续操作!
2023-03-31 11:15:40 配置文件下载成功,检查是否有更新...
2023-03-31 11:15:10 错误:配置文件【config】订阅失败,尝试不使用代理下载配置文件...
2023-03-31 11:13:37【/tmp/yaml_sub_tmp_config.yaml】下载失败:【curl: (28) Operation too slow. Less than 1 bytes/sec transferred the last 30 seconds】
2023-03-31 11:13:37【/tmp/yaml_sub_tmp_config.yaml】下载失败:【curl: (28) Operation too slow. Less than 1 bytes/sec transferred the last 30 seconds】
2023-03-31 11:13:37【/tmp/yaml_sub_tmp_config.yaml】下载失败:【curl: (28) Operation too slow. Less than 1 bytes/sec transferred the last 30 seconds】
2023-03-31 11:13:37 开始更新配置文件【config】...

暂未发现[【/tmp/openclash_last_version】下载失败]现象

openclash v0.45.103-beta

curl版本是7.86.0-3 root@OpenWrt:~# curl -V curl 7.86.0 (x86_64-openwrt-linux-gnu) libcurl/7.86.0 OpenSSL/1.1.1s nghttp2/1.44.0 Release-Date: 2022-10-26 Protocols: file ftp ftps http https mqtt Features: alt-svc HSTS HTTP2 HTTPS-proxy IPv6 Largefile SSL threadsafe

curl在openwrt的cmdline下是可以返回github相关订阅的,几乎无延迟。

root@OpenWrt:~# curl https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_Go
ogle.ini -I
HTTP/2 200 
cache-control: max-age=300
content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
content-type: text/plain; charset=utf-8
etag: "0a30650eaff2bc2fc300f94a9ebc85b4ca313f4188283b9645ae319bb0cc9729"
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
x-frame-options: deny
x-xss-protection: 1; mode=block
x-github-request-id: 6392:130AC:258A3D:27ABB8:64264F0E
accept-ranges: bytes
date: Fri, 31 Mar 2023 03:10:12 GMT
via: 1.1 varnish
x-served-by: cache-mrs10574-MRS
x-cache: HIT
x-cache-hits: 1
x-timer: S1680232212.229081,VS0,VE0
vary: Authorization,Accept-Encoding,Origin
access-control-allow-origin: *
x-fastly-request-id: d52185be60215152b3420e53a4c3f8a2987eedf5
expires: Fri, 31 Mar 2023 03:15:12 GMT
source-age: 6
content-length: 9636
ghost commented 1 year ago

问题因该就是路由器自身的system dns污染造成的,我这里的情况是这样的:

虽然openclash开启了fake-ip模式,但是路由器本身似乎不会走fake-ip发起请求(似乎和固件有关,有些固件的/etc/resolv.conf不会被dnsmasq修改成127.0.0.1,也就无法走fake-ip模式),而被污染后,raw.githubusercontent.com这个域名在路由器上是解析成0.0.0.0的,这个地址被认为是local地址就直连了,结果当然是访问失败。

所以你在pc或者手机上看似乎github是访问正常的,但路由器本身访问的时候却是被污染的。

基本这都是本地isp才会干的污染,可以看看路由器上/etc/resolv.conf里的nameserver是什么,一般污染就是这个dns服务器干的,一般也就是wan接口接受上游通告dns而获得的本地isp dns或者192.168.1.1这样的光猫地址(也算是光猫作为上游通告过来的dns)。

解决的方法其实就是wan接口不要使用上游通告的dns(最终就是让路由器的system dns至少在访问我们需要的域名时不污染),我试了下119.29.29.29,223.5.5.5,114.114.114.114这些主流公共dns基本上都不会污染github。

路由器上写死Hosts也是个做法但肯定不太灵活。

因为各地isp dns的污染策略似乎不是很稳定,有时候污染有时候不污染,这就导致了有时候正常有时候出问题。我这里也是最近这两天才出现的。

这个问题解决起来不麻烦。

不过我有点好奇的是,路由器本身流量不走fake-ip模式,而使用路由器的系统dns这个是不是符合设计的预期呢?其实大部分时候路由器本身的流量我们确实不太关心,不过遇到像github这种特例就导致问题了。

要彻底解决的话,是否可以让路由器本身流量像路由器下挂的设备一样也走fake-ip模式呢?就是不知道这样会不会有dns递归死循环的问题。

ghost commented 1 year ago

可以先自己给dnsmsq设置localuse,把dnsmsq作为system resolver,就可以避免路由器自身流量遭遇dns污染了。

uci set dhcp.@dnsmasq[0].localuse="1"
uci commit dhcp
/etc/init.d/dnsmasq restart

参考:https://github.com/vernesong/OpenClash/issues/3195

yvesll commented 1 year ago

最新的release又出现了这个问题,curl报的是48,改了github cdn也没起作用

991547436 commented 1 year ago

我的也是,只要更新GeoIP服务就起不来

vernesong commented 1 year ago

你的意思是更新重启完,clash的7874端口DNS就不通了

ycjcl868 commented 1 year ago

我的困惑不在于它能不能下载,而在于它为何要锲而不舍拧巴倔强的非下载不可。这个倔强的下载只是个结果啦,原因在于,这个时候,路由器上网都有了问题。

这种莫名其妙要去拉个“/tmp/clash_last_version”的行为也是很让人恶心的,莫名其妙,无中生有,令人生疑

确实,莫名突然执行

kfstorm commented 1 year ago
2013-01-18 17:07:52【/tmp/openclash_last_version】Download Failed:【curl: (60) Cert verify failed: BADCERT_FUTURE】

我这里报错内容是BADCERT_FUTURE,我猜测是路由器刚启动的时候系统时间还是2013年,结果证书验证失败了。

PolymorphismException commented 1 year ago

(https://github.com/istoreos/istoreos/issues/487#issuecomment-1425743089) 可以解决这个问题

jacobin commented 1 year ago

(istoreos/istoreos#487 (comment)) 可以解决这个问题

不是同一个问题。不是libcurl的问题。可能是dns解析不成的问题。真正的问题是:没有理由这么歇斯底里的试图去下载什么玩意。

GrayPenn commented 1 year ago

自己修改一下hosts就可以解决了

https://github.com/521xueweihan/GitHub520

iknowzxc commented 1 year ago

直连污染导致的 image

抱歉,请问以上的设置是在哪里的?我没找到

@benjiamin2014 全局设置-->基本设置

全局设置下没有找到基本设置。。。