proxy-agent
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -11,6 +11,6 @@ import { Agent, AgentOptions } from 'agent-base'; | ||
interface ProxyAgentConstructor { | ||
(options: AgentOptions | string): ProxyAgent.ProxyAgent; | ||
new (options: AgentOptions | string): ProxyAgent.ProxyAgent; | ||
(options?: AgentOptions | string): ProxyAgent.ProxyAgent; | ||
new (options?: AgentOptions | string): ProxyAgent.ProxyAgent; | ||
} | ||
export = proxy; | ||
export = proxy; |
{ | ||
"name": "proxy-agent", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Maps proxy protocols to `http.Agent` implementations", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,3 +7,5 @@ proxy-agent | ||
This module provides a function that returns proxying `http.Agent` instances to | ||
use based off of a given proxy URI. | ||
use based off of a given proxy URI. If no URI is provided, then | ||
[proxy-from-env](https://www.npmjs.com/package/proxy-from-env) is used to get the URI | ||
from `$HTTP_PROXY`, `$HTTPS_PROXY` and `$NO_PROXY` among others. | ||
@@ -51,2 +53,4 @@ An LRU cache is used so that `http.Agent` instances are transparently re-used for | ||
// this is the important part! | ||
// If no proxyUri is specified, then https://www.npmjs.com/package/proxy-from-env | ||
// is used to get the proxyUri. | ||
agent: new ProxyAgent(proxyUri) | ||
@@ -53,0 +57,0 @@ }; |
Sorry, the diff of this file is not supported yet
25326
485
108