Update "Use Dev Proxy with Node.js" for native `fetch` proxy support and certificate trust

Aberta
#2,084 0 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@waldekmastykarz já está trabalhando nisso.

Desde 5/11/2026.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

documentation work in progress

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 fetch and http(s) through HTTP(S)_PROXY when NODE_USE_ENV_PROXY=1 or --use-env-proxy is set.
  • NODE_EXTRA_CA_CERTS with the Dev Proxy root certificate is the safe alternative to disabling TLS verification. The certificate can be fetched with GET /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=0 with NODE_EXTRA_CA_CERTS, showing how to obtain the certificate through the API or CLI.
  • For older Node versions, keep the fallbacks: undici EnvHttpProxyAgent or global-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".

Linguagem predominante
C#
Estrelas
841
Forks
90
Merge médio
2d 10h
PRs com merge (30d)
63

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de dotnet/dev-proxy

Todas as issues de dotnet/dev-proxy

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.