proxy_agent.ts: Document that no other code passes in explicit agent

From my inspection as of this date anyway.
This commit is contained in:
Anmol Sethi 2020-12-04 01:41:39 -05:00
parent 691d44d4a8
commit a72c642125
No known key found for this signature in database
GPG Key ID: 8CEF1878FF10ADEB
1 changed files with 8 additions and 0 deletions

View File

@ -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