V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
stephCurry
V2EX  ›  程序员

MacOS Clash 增强模式出现 SSL_ERROR_SYSCALL

  •  
  •   stephCurry · 2022-09-17 19:17:55 +08:00 · 3324 次点击
    这是一个创建于 584 天前的主题,其中的信息可能已经有所发展或是发生改变。

    起因:
    之前使用 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 均正常。

    Andreas8
        1
    Andreas8  
       2022-09-17 23:24:55 +08:00 via iPhone
    我之前也是碰到这种问题,就装了个 outline 用,这周换成了 clash for windos
    yinheli
        2
    yinheli  
       2022-09-18 01:18:05 +08:00
    试试直连代理? 先排除代理的问题

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


    问题已解决,选择 auto interface detection 选择 NONE 原因,切换其他即可。。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3644 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 04:40 · PVG 12:40 · LAX 21:40 · JFK 00:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.