Android 版 Clash Meta for Android 中 rule-provider 的 tls.ca 自定义证书(自签名)被忽略,始终回退到系统证书库 #777
Closed
xlinmengen
started this conversation in
General
Replies: 1 comment
-
|
又哪个AI给你的幻觉,rule-provider从来不支持指定tls ca的配置 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
标题: Android 版 Clash Meta for Android 中
rule-provider的tls.ca自定义证书(自签名)被忽略,始终回退到系统证书库描述:
问题摘要
在为
rule-provider的 URL 使用自签名服务器证书时,配置tls.ca(无论是内嵌 PEM 字符串还是文件路径)在 Android 上完全没有效果。同样的配置在 Windows 上(Clash Verge / Mihomo)工作正常。在 Android 上,无论tls.ca配置正确、指向有效文件路径、甚至完全删除该字段,客户端始终报错x509: certificate signed by unknown authority。复现步骤
BasicConstraints: CA:TRUE以及必要的 IP SAN)。reject.yaml)。rule-provider:预期行为
tls.ca字段(无论是内嵌字符串还是文件路径)应被尊重,就像在 Windows / Mihomo 内核上一样。实际行为
tls: failed to verify certificate: x509: certificate signed by unknown authority。ca: "-----BEGIN...\n...")ca: "/storage/emulated/0/Download/ca.crt")tls.catls块内添加insecure: true(或skip-cert-verify: true)rule-provider的 HTTPS 请求,配置文件似乎被完全忽略。环境信息
补充说明
BasicConstraints: CA:TRUE,服务器证书包含正确的 SAN/IP。tls.ca配置。它始终使用 Android 系统证书库,而系统证书库默认不信任用户安装或自定义的 CA 证书(Android 7.0+ 限制)。建议修复方式
应用应在
rule-provider下载时尊重tls.ca配置,具体方式:HttpClient/OkHttpClient,加载指定的 CA 证书。tls.ca),而不是在应用自己的运行时中执行网络请求。这对于依赖私有 PKI / 自签名证书、且不希望强迫用户 Root 设备或手动安装系统证书的用户来说至关重要。
Beta Was this translation helpful? Give feedback.
All reactions