近日接到众多用户汇报 Surge 无法与 nextdns.io 完成 TLS 握手,该文解释了此问题的来由与 workaround。
由该说明了解到
Our TLS certificate provider decided (without notice) to stop embedding SCTs in the certificates themselves, but to put them in the OCSP staples. This is an optimization and should have been transparent to us, but it broke our custom certificate check we have in the macOS app which is expecting SCTs embedded.
NextDNS 的 TLS 证书中不再包含服务端证书所需要的 SCTs 信息,改为由 OCSP 提供。然而,Surge 在验证 TLS 证书时,不会触发 OCSP 请求。(因为 Surge 本身作为系统级代理软件,若触发 OCSP 请求而该请求又被 Surge 捕获且使用一个 TLS 代理,则会导致环请求卡死 Surge 和系统。)所以在验证证书时会因缺乏 SCTs 信息失败,由于该部分证书验证逻辑由 iOS/macOS 的 Security.framework 完成,我们无法调整该逻辑。
Workaround:
- 对于 DOH 功能,可配置以下参数临时关闭 DOH 的服务端证书验证(需要最新的 beta 版本)
[General]
doh-skip-cert-verification=true
- 对于 $httpClient 和其他组件,目前暂无方法可绕过。