|
@ -3,6 +3,7 @@ import * as url from 'url'; |
|
|
import { HttpsProxyAgent } from 'https-proxy-agent'; |
|
|
import { HttpsProxyAgent } from 'https-proxy-agent'; |
|
|
import fetch, { RequestInfo, RequestInit, Response } from 'node-fetch'; |
|
|
import fetch, { RequestInfo, RequestInit, Response } from 'node-fetch'; |
|
|
import { configuration } from '../../configuration'; |
|
|
import { configuration } from '../../configuration'; |
|
|
|
|
|
import { Logger } from '../../logger'; |
|
|
|
|
|
|
|
|
export { fetch }; |
|
|
export { fetch }; |
|
|
export type { BodyInit, RequestInit, Response } from 'node-fetch'; |
|
|
export type { BodyInit, RequestInit, Response } from 'node-fetch'; |
|
@ -32,6 +33,7 @@ export function getProxyAgent(strictSSL?: boolean): HttpsProxyAgent | undefined |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (proxyUrl) { |
|
|
if (proxyUrl) { |
|
|
|
|
|
Logger.debug(`Using https proxy: ${proxyUrl}`); |
|
|
return new HttpsProxyAgent({ |
|
|
return new HttpsProxyAgent({ |
|
|
...url.parse(proxyUrl), |
|
|
...url.parse(proxyUrl), |
|
|
rejectUnauthorized: strictSSL, |
|
|
rejectUnauthorized: strictSSL, |
|
|