http-proxy-agent
Enable support for http_proxy, https_proxy and no_proxy env variables
Installation
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 ],
});
Environment variables
HTTP_PROXY
- proxy url for HTTP requestshttp_proxy
- seeHTTP_PROXY
HTTPS_PROXY
- proxy url for HTTPS requestshttps_proxy
- seeHTTPS_PROXY
NO_PROXY
- list of urls patterns for which proxying is disabledno_proxy
- seeNO_PROXY
Explanation
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
Limitations
HttpProxyAgentModule
support only HTTPS requests