From a72c642125f7149f2d5a8a4348ccbffbb429cc0e Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Fri, 4 Dec 2020 01:41:39 -0500 Subject: [PATCH] proxy_agent.ts: Document that no other code passes in explicit agent From my inspection as of this date anyway. --- src/node/proxy_agent.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/node/proxy_agent.ts b/src/node/proxy_agent.ts index 61d8dee6..38ecfa45 100644 --- a/src/node/proxy_agent.ts +++ b/src/node/proxy_agent.ts @@ -38,6 +38,14 @@ export function monkeyPatch(vscode: boolean): void { pa = new (proxyagent as any).default(process.env.HTTP_PROXY) } + /** + * None of our code ever passes in a explicit agent to the http modules but VS Code's + * does sometimes but only when a user sets the http.proxy configuration. + * See https://code.visualstudio.com/docs/setup/network#_legacy-proxy-server-support + * + * Even if they do, it's probably the same proxy so we should be fine! And those are + * deprecated anyway. + */ const http = require("http") const https = require("https") http.globalAgent = pa