|
我没有检查到任何相关的日志,我具有一个正在运行的 clash 代理,但是我没有配置 nodejs 和其它软件相关的代理,同时检查过网络状况和插件都不会影响这个问题的存在 |
Replies: 3 comments
|
先说结论:「node 没配代理」不意味着 clash 不在链路里 —— 如果你的 clash 开着 TUN / 增强模式,它是在网络层透明接管流量的,Node 根本不需要任何代理配置。所以问题几乎一定出在 clash 这条链路上,而不是「DSH 没装好」(你重装过多次,这条基本可以排除)。 按下面顺序排,每步都很便宜: 1. 先绕开 clash 验证 API 本身curl -v https://api.deepseek.com/v1/models -H "Authorization: Bearer <你的KEY>"
2. 确认 clash 的模式与规则
3. 排除 DSH 侧(可能性低,但要排除)
4. 最小对照关掉 clash → 开一个新会话试一次。通了就是 2;还是不通,把报错原文贴出来(遮掉 key),我按具体错误继续缩范围。你截图里的报错文本我看不清,原文对定位帮助最大。 |
|
我遇到了同类问题,让dsh自查后解决,供你参考: Node 端 TLS 拦截导致间歇性
|
| 场景 | 结果 |
|---|---|
| 原始 TLS 握手(直连) | 6/10 报 SELF_SIGNED_CERT_IN_CHAIN |
| 复用连接发 POST | 16/20 成功 |
| 每个请求都新建连接 | 仅 1–2/20 成功 |
| 所以程序空闲一段时间后(连接池需要开新连接)最容易失败, | |
| 短时间内连续操作反而正常——这就是"没规律"的来源。 |
修复
把拦截根证书导出,让 Node 额外信任它:
[Environment]::SetEnvironmentVariable(
'NODE_EXTRA_CA_CERTS',
"$env:USERPROFILE\.dsh\certs\interception-roots.pem",
'User')NODE_EXTRA_CA_CERTS 只在进程启动时读取,必须重启程序。
修复后实测:原始握手 0/10 报错,新建连接请求 20/20 成功。
|
Cross-reference: this failure mode is already documented in #6338. On Windows, antivirus HTTPS scanning (Kaspersky in the confirmed case) re-signs Quick check: node -e "fetch('https://api.deepseek.com').then(r=>console.log('HTTP',r.status)).catch(e=>console.error(e, e.cause))"If that prints setx NODE_USE_SYSTEM_CA 1then open a new shell and restart dsh. Certificate evidence and the full write-up: #6338 (comment) (中文)若上面的命令复现出 |

Cross-reference: this failure mode is already documented in #6338.
On Windows, antivirus HTTPS scanning (Kaspersky in the confirmed case) re-signs
api.deepseek.comwith its own local root CA. The Windows certificate store trusts that root, but Node's bundled CA set does not, so every request fails withSELF_SIGNED_CERT_IN_CHAINafter the retry sequence — which surfaces in dsh only asDeepSeek API request to https://api.deepseek.com failed.Quick check:
If that prints
SELF_SIGNED_CERT_IN_CHAIN, the one-variable workaround is:setx NODE_USE_SYSTEM_CA 1then open a new shell …