File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import * as https from "https"
44import ProxyAgent from "proxy-agent"
55import * as semver from "semver"
66import * as url from "url"
7- import { httpProxyUri , version } from "./constants"
7+ import { version } from "./constants"
88import { SettingsProvider , UpdateSettings } from "./settings"
99
1010export interface Update {
@@ -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 ) {
You can’t perform that action at this time.
0 commit comments