Skip to content

Commit 99959ee

Browse files
committed
fix proxy
1 parent 522b087 commit 99959ee

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

packages/cubejs-backend-shared/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@
4242
"decompress": "^4.2.1",
4343
"env-var": "^6.3.0",
4444
"fs-extra": "^9.1.0",
45-
"proxy-agent": "^6.4.0",
45+
"https-proxy-agent": "^7.0.6",
4646
"moment-range": "^4.0.2",
4747
"moment-timezone": "^0.5.47",
4848
"node-fetch": "^2.6.1",
49+
"proxy-agent": "^6.5.0",
4950
"shelljs": "^0.8.5",
5051
"throttle-debounce": "^3.0.1",
5152
"uuid": "^8.3.2"

packages/cubejs-backend-shared/src/proxy.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { exec } from 'child_process';
22
import { ProxyAgent } from 'proxy-agent';
3+
import { HttpsProxyAgent } from 'https-proxy-agent';
34

45
function getCommandOutput(command: string) {
56
return new Promise<string>((resolve, reject) => {
@@ -33,7 +34,7 @@ export async function getHttpAgentForProxySettings() {
3334

3435
if (proxy) {
3536
console.warn('Npm proxy settings are deprecated. Please use HTTP_PROXY, HTTPS_PROXY environment variables instead.');
36-
return proxy;
37+
return new HttpsProxyAgent(proxy);
3738
}
3839

3940
return new ProxyAgent();

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24509,7 +24509,7 @@ proxy-addr@~2.0.7:
2450924509
forwarded "0.2.0"
2451024510
ipaddr.js "1.9.1"
2451124511

24512-
proxy-agent@^6.4.0:
24512+
proxy-agent@^6.5.0:
2451324513
version "6.5.0"
2451424514
resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.5.0.tgz#9e49acba8e4ee234aacb539f89ed9c23d02f232d"
2451524515
integrity sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==

0 commit comments

Comments
 (0)