MacOS Clash 增强模式出现 SSL_ERROR_SYSCALL

2022-09-17 19:17:55 +08:00
 stephCurry

起因:
之前使用 subconverter 更新 clash 规则一直正常,本地规则为 http://127.0.0.1:25500/sub?target=clash&config=https%3A%2F%2Fraw.githubusercontent.com%2FACL4SSR%2FACL4SSR%2Fmaster%2FClash%2Fconfig%2FACL4SSR_AdblockPlus.ini&url=ss ;

然而今天发现执行后并没有使用 ACL4SSR_AdblockPlus 规则,查看 subconverter 终端发现 raw.githubusercontent.com 竟被移动宽带的 DNS 服务直接解析为 0.0.0.0 。。。好吧,那就启用 Clash X Pro 增强模式呗,倒是正常解析 raw.githubusercontent.com 地址了,但是出现了 SSL 问题,截取如下:

[VERB] CACHE NOT EXIST: 'https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_AdblockPlus.ini', creating new cache.
*   Trying 198.18.0.42:443...
* Connected to raw.githubusercontent.com (198.18.0.42) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
* Closing connection 0

发现问题出现在 SSL 链接问题;于是由尝试在 Clash X Pro 增强模式执行 curl https://www.baidu.com -v ,果然,出现了同样的问题:

❯ curl https://www.baidu.com -v                                              ─╯
*   Trying 198.18.0.15:443...
* Connected to www.baidu.com (198.18.0.15) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (OUT), TLS handshake, Client hello (1):
* LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to www.baidu.com:443
* Closing connection 0
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to www.baidu.com:443

然而,解除 Clash X Pro 增强模式,在终端中执行 curl https://www.baidu.com -v 就正常,所以也并不是 Mac 本机 SSL 证书问题;

鄙人才疏学浅,做了两种假设,但似乎也并不成立:

  1. 类似流量抓包如 Fiddler 、MitMproxy 等工具,在未安装其根证书前,访问 HTTPS 网站,浏览器会有提示,但是 Clash X Pro 增强模式导致的问题直接打不开;
  2. 是否 Clash X Pro 增强模式的 TUN 模式需要独立的 CA 证书?但是之前更新 subconverter 并无此问题。

还请 V 友各位大佬解惑!

还有,节点当然都没问题,Clash 启用系统代理,浏览器访问 Google 均正常。

3492 次点击
所在节点    程序员
4 条回复
Andreas8
2022-09-17 23:24:55 +08:00
我之前也是碰到这种问题,就装了个 outline 用,这周换成了 clash for windos
yinheli
2022-09-18 01:18:05 +08:00
试试直连代理? 先排除代理的问题

curl -v --socks5-hostname xxx:xxx https://google.com
yinheli
2022-09-18 01:19:55 +08:00
一直觉得 clash 的规则搞的太复杂了,一直用自己写的版本,最近还用 rust 重构了一个
stephCurry
2022-09-19 10:33:10 +08:00


问题已解决,选择 auto interface detection 选择 NONE 原因,切换其他即可。。。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/880862

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX