Enable support for http_proxy, https_proxy and no_proxy env variables
npm install @tramvai/module-http-proxy-agentEnable support for http_proxy, https_proxy and no_proxy env variables
You need to install @tramvai/module-http-proxy-agent
``bash`
yarn add @tramvai/module-http-proxy-agent
And connect in the project after @tramvai/module-http-client module
`tsx
import { createApp } from '@tramvai/core';
import { HttpClientModule } from '@tramvai/module-http-client';
import { HttpProxyAgentModule } from '@tramvai/module-http-proxy-agent';
createApp({
name: 'tincoin',
// need to be placed after HttpClientModule to override HTTP_AGENT_TOKEN
modules: [HttpClientModule, HttpProxyAgentModule],
});
`
- HTTP_PROXY - proxy url for HTTP requestshttp_proxy
- - see HTTP_PROXY
- HTTPS_PROXY - proxy url for HTTPS requestshttps_proxy
- - see HTTPS_PROXY
- NO_PROXY - list of urls patterns for which proxying is disabledno_proxy
- - see NO_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