Update "Use Dev Proxy with Node.js" for native `fetch` proxy support and certificate trust
维护者通常 1 天内回复
@waldekmastykarz 已经在做这个了。
开始于 2026年11月5日。
评估
这个 Issue 还没有评估数据。
描述
Problem
The Node.js page states that native fetch "doesn't support configuring a proxy", and recommends NODE_TLS_REJECT_UNAUTHORIZED=0 for certificate errors. Both are outdated:
- Node.js 24+ (and 22.21+) routes
fetchandhttp(s)throughHTTP(S)_PROXYwhenNODE_USE_ENV_PROXY=1or--use-env-proxyis set. NODE_EXTRA_CA_CERTSwith the Dev Proxy root certificate is the safe alternative to disabling TLS verification. The certificate can be fetched withGET /proxy/rootCertificate?format=crt.
In all five evaluated runs, the agent worked this out from model knowledge rather than the docs. An agent that followed the page would disable TLS validation, or conclude that native fetch can't be proxied.
Proposal
- Rewrite the "Native Node.js fetch API" section around
NODE_USE_ENV_PROXY, including the version floor. - Replace
NODE_TLS_REJECT_UNAUTHORIZED=0withNODE_EXTRA_CA_CERTS, showing how to obtain the certificate through the API or CLI. - For older Node versions, keep the fallbacks: undici
EnvHttpProxyAgentorglobal-agent.
Found while evaluating how coding agents use Dev Proxy: VS Code + GitHub Copilot Chat with Claude Sonnet 5.5, Dev Proxy 4.0.0 on Windows, 5 runs of the task "add a CI script that starts Dev Proxy in the background, starts and stops recording through the API around npm start, and shuts Dev Proxy down through the API".
- 主要语言
- C#
- 星标
- 841
- 派生
- 90
- 平均合并
- 2 天 10 小时
- 30 天内合并 PR
- 63
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dotnet/dev-proxy 的其他 Issue
-
ExecutionSummaryPlugin: internal log messages leak into the report as an "Unknown" category可能已有人在做 @waldekmastykarz 今天认领。 未关闭bug work in progress
dotnet/dev-proxy#2097 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Add `devproxy cert export` to write the root certificate to a file可能已有人在做 @waldekmastykarz 今天认领。 未关闭work in progress
dotnet/dev-proxy#2085 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Reference the API-inventory preset from the CI/CD and Record docs可能已有人在做 @waldekmastykarz 今天认领。 未关闭documentation work in progress
dotnet/dev-proxy#2083 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Document the shutdown contract for `POST /proxy/stopProxy`可能已有人在做 @waldekmastykarz 今天认领。 未关闭documentation work in progress
dotnet/dev-proxy#2081 · 已指派 1 人 ·
维护者通常 1 天内回复
-
`devproxy --detach` blocks callers that capture its output可能已有人在做 @waldekmastykarz 今天认领。 未关闭work in progress
dotnet/dev-proxy#2080 · 已指派 1 人 ·
维护者通常 1 天内回复
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
Bug: Needs Replicating
难度 2/5 1-3 小时 新手友好度 62/100
space-wizards/RobustToolbox#7189 ·
维护者通常 1 天内回复
-
affected/v17 area/frontend type/bug
难度 2/5 1-3 小时 新手友好度 68/100
umbraco/Umbraco-CMS#24491 · 1 条评论 ·
维护者通常 2 天内回复
-
enhancement needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/microsoft-ui-reactor#1460 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
CodeForFire/lagebuch#912 ·
维护者通常 1 天内回复