Skip to content

Commit fdeaba9

Browse files
chore: bump proxy-agent from 5.0.0 to 6.2.1 (#6247)
* chore: bump proxy-agent from 5.0.0 to 6.2.1 Bumps [proxy-agent](https://github.com/TooTallNate/proxy-agents/tree/HEAD/packages/proxy-agent) from 5.0.0 to 6.2.1. - [Release notes](https://github.com/TooTallNate/proxy-agents/releases) - [Changelog](https://github.com/TooTallNate/proxy-agents/blob/main/packages/proxy-agent/CHANGELOG.md) - [Commits](https://github.com/TooTallNate/proxy-agents/commits/[email protected]/packages/proxy-agent) --- updated-dependencies: - dependency-name: proxy-agent dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Update proxy-agent usage --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Asher <[email protected]>
1 parent 40ff2e6 commit fdeaba9

File tree

3 files changed

+107
-181
lines changed

3 files changed

+107
-181
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"js-yaml": "^4.0.0",
9999
"limiter": "^2.1.0",
100100
"pem": "^1.14.2",
101-
"proxy-agent": "^5.0.0",
101+
"proxy-agent": "^6.2.1",
102102
"qs": "6.11.0",
103103
"rotating-file-stream": "^3.0.0",
104104
"safe-buffer": "^5.1.1",

src/node/update.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { field, logger } from "@coder/logger"
22
import * as http from "http"
33
import * as https from "https"
4-
import ProxyAgent from "proxy-agent"
4+
import { ProxyAgent } from "proxy-agent"
55
import * as semver from "semver"
66
import * as url from "url"
77
import { httpProxyUri, version } from "./constants"
@@ -104,7 +104,9 @@ export class UpdateProvider {
104104
const request = (uri: string): void => {
105105
logger.debug("Making request", field("uri", uri))
106106
const isHttps = uri.startsWith("https")
107-
const agent = httpProxyUri ? new ProxyAgent(httpProxyUri) : undefined
107+
const agent = new ProxyAgent({
108+
getProxyForUrl: () => httpProxyUri || "",
109+
})
108110
const httpx = isHttps ? https : http
109111
const client = httpx.get(uri, { headers: { "User-Agent": "code-server" }, agent }, (response) => {
110112
if (!response.statusCode || response.statusCode < 200 || response.statusCode >= 400) {

0 commit comments

Comments
 (0)