Enable support for http_proxy, https_proxy and no_proxy env variables
You need to install @tramvai/module-http-proxy-agent
yarn add @tramvai/module-http-proxy-agent
And connect in the project
import { createApp } from '@tramvai/core';
import { HttpProxyAgentModule } from '@tramvai/module-http-proxy-agent';
createApp({
name: 'tincoin',
modules: [ HttpProxyAgentModule ],
});
-
HTTP_PROXY
- proxy url for HTTP requests -
http_proxy
- seeHTTP_PROXY
-
HTTPS_PROXY
- proxy url for HTTPS requests -
https_proxy
- seeHTTPS_PROXY
-
NO_PROXY
- list of urls patterns for which proxying is disabled -
no_proxy
- seeNO_PROXY
HttpProxyAgentModule
mokeypatch standard NodeJS https.Agent for supporting connections via forwarding proxy, if some of mentioned above env variables are presented.
Some NO_PROXY
env specification and examples available here
Source code forked from node-keepalive-proxy-agent
HttpProxyAgentModule
support only HTTPS requests