V2EX 09月29日 10:24
小火箭更新后curl命令报错分析
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

用户在Mac mini M4(macOS 15.6.1)上更新小火箭至2.2.71(2829)版本后,发现使用curl命令时出现“HTTP2 framing layer”错误,具体表现为curl: (16) Error in the HTTP2 framing layer。在关闭小火箭后,curl命令恢复正常。通过详细的curl -v输出,可以看到SSL握手成功,但接收HTTP2数据时出现“LibreSSL SSL_read: LibreSSL/3.3.6: error:1404C3FC:SSL routines:ST_OK:sslv3 alert bad record mac, errno 0”的错误,表明在TLS/SSL通信层面存在问题,具体是HTTP2数据传输过程中MAC校验失败。

🚦 **问题现象**: 用户在Mac mini M4(macOS 15.6.1)上更新“小火箭”应用到2.2.71(2829)版本后,在使用curl命令时出现“curl: (16) Error in the HTTP2 framing layer”的错误。该问题仅在“小火箭”运行时出现,关闭后则正常。

🔍 **错误根源分析**: 通过`curl -v`的详细输出,可以观察到SSL握手过程正常,但当curl尝试通过HTTP/2协议从github.com接收数据时,LibreSSL库报告了“sslv3 alert bad record mac”的错误。这通常意味着在TLS/SSL通信中,接收到的数据包的完整性校验失败,表明数据在传输过程中被篡改或损坏,或者存在协议实现上的不兼容。

💡 **可能原因推测**: 鉴于问题仅在“小火箭”运行时出现,最可能的原因是“小火箭”作为一个网络代理工具,其在处理HTTP/2流量时,可能与macOS系统或LibreSSL库的HTTP/2实现存在兼容性问题,导致MAC校验失败。这可能与“小火箭”对HTTP/2流量的封装、解封装过程,或者其证书验证机制有关。

前两天更新完 mac 版小火箭后 开启小火箭使用 curl 命令会出问题(不开则没问题)

机器是 macmini m4系统是 15.6.1小火箭版本是 2.2.71(2829)

curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.shcurl: (16) Error in the HTTP2 framing layer
curl -v https://github.com                                                    * Host github.com:443 was resolved.* IPv6: ::ffff:0:c612:12* IPv4: 140.82.112.3*   Trying 140.82.112.3:443...* Connected to github.com (140.82.112.3) port 443* ALPN: curl offers h2,http/1.1* (304) (OUT), TLS handshake, Client hello (1):*  CAfile: /etc/ssl/cert.pem*  CApath: none* (304) (IN), TLS handshake, Server hello (2):* (304) (IN), TLS handshake, Unknown (8):* (304) (IN), TLS handshake, Certificate (11):* (304) (IN), TLS handshake, CERT verify (15):* (304) (IN), TLS handshake, Finished (20):* (304) (OUT), TLS handshake, Finished (20):* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF* ALPN: server accepted h2* Server certificate:*  subject: CN=github.com*  start date: Feb  5 00:00:00 2025 GMT*  expire date: Feb  5 23:59:59 2026 GMT*  subjectAltName: host "github.com" matched cert's "github.com"*  issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo ECC Domain Validation Secure Server CA*  SSL certificate verify ok.* using HTTP/2* [HTTP/2] [1] OPENED stream for https://github.com/* [HTTP/2] [1] [:method: GET]* [HTTP/2] [1] [:scheme: https]* [HTTP/2] [1] [:authority: github.com]* [HTTP/2] [1] [:path: /]* [HTTP/2] [1] [user-agent: curl/8.7.1]* [HTTP/2] [1] [accept: */*]> GET / HTTP/2> Host: github.com> User-Agent: curl/8.7.1> Accept: */*> * Request completely sent off* LibreSSL SSL_read: LibreSSL/3.3.6: error:1404C3FC:SSL routines:ST_OK:sslv3 alert bad record mac, errno 0* Failed receiving HTTP2 data: 56(Failure when receiving data from the peer)* Connection #0 to host github.com left intactcurl: (56) LibreSSL SSL_read: LibreSSL/3.3.6: error:1404C3FC:SSL routines:ST_OK:sslv3 alert bad record mac, errno 0

搞了两天没搞明白是啥问题,有没有大佬知道怎么解决

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

小火箭 curl HTTP2 SSL macOS 网络代理 LibreSSL bad record mac Little Rocket network proxy
相关文章