8 lines
284 B
TypeScript
8 lines
284 B
TypeScript
|
import * as plugins from './plugins.js';
|
||
|
|
||
|
export const findProxy = () => {
|
||
|
return process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy
|
||
|
}
|
||
|
export const getAgent = () => {
|
||
|
return new plugins.httpsProxy.HttpsProxyAgent(findProxy());
|
||
|
}
|