Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

proxy-agent

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proxy-agent - npm Package Compare versions

Comparing version 6.1.2 to 6.2.0

3

./dist/index.js

@@ -85,2 +85,3 @@ "use strict";

opts?.httpsAgent || new https.Agent(opts);
this.getProxyForUrl = opts?.getProxyForUrl || proxy_from_env_1.getProxyForUrl;
}

@@ -92,3 +93,3 @@ async connect(req, opts) {

const url = new URL(req.path, `${protocol}//${host}`).href;
const proxy = (0, proxy_from_env_1.getProxyForUrl)(url);
const proxy = this.getProxyForUrl(url);
if (!proxy) {

@@ -95,0 +96,0 @@ debug('Proxy not enabled for URL: %o', url);

@@ -12,2 +12,3 @@ /// <reference types="node" />

type AgentConstructor = new (...args: never[]) => Agent;
type GetProxyForUrlCallback = (url: string) => string;
/**

@@ -32,2 +33,8 @@ * Supported proxy types.

httpsAgent?: http.Agent;
/**
* A callback for dynamic provision of proxy for url.
* Defaults to standard proxy environment variables,
* see https://www.npmjs.com/package/proxy-from-env for details
*/
getProxyForUrl?: GetProxyForUrlCallback;
};

@@ -49,2 +56,3 @@ /**

httpsAgent: http.Agent;
getProxyForUrl: GetProxyForUrlCallback;
constructor(opts?: ProxyAgentOptions);

@@ -51,0 +59,0 @@ connect(req: http.ClientRequest, opts: AgentConnectOpts): Promise<http.Agent>;

@@ -85,2 +85,3 @@ "use strict";

opts?.httpsAgent || new https.Agent(opts);
this.getProxyForUrl = opts?.getProxyForUrl || proxy_from_env_1.getProxyForUrl;
}

@@ -92,3 +93,3 @@ async connect(req, opts) {

const url = new URL(req.path, `${protocol}//${host}`).href;
const proxy = (0, proxy_from_env_1.getProxyForUrl)(url);
const proxy = this.getProxyForUrl(url);
if (!proxy) {

@@ -95,0 +96,0 @@ debug('Proxy not enabled for URL: %o', url);

{
"name": "proxy-agent",
"version": "6.1.2",
"version": "6.2.0",
"description": "Maps proxy protocols to `http.Agent` implementations",

@@ -34,3 +34,3 @@ "main": "./dist/index.js",

"lru-cache": "^7.14.1",
"pac-proxy-agent": "^6.0.1",
"pac-proxy-agent": "^6.0.2",
"proxy-from-env": "^1.1.0",

@@ -37,0 +37,0 @@ "socks-proxy-agent": "^8.0.1"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc