Socket
Socket
Sign inDemoInstall

http-proxy-agent

Package Overview
Dependencies
3
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.1.1 to 7.0.0

10

./dist/index.js

@@ -36,5 +36,2 @@ "use strict";

const debug = (0, debug_1.default)('http-proxy-agent');
function isHTTPS(protocol) {
return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false;
}
/**

@@ -45,5 +42,2 @@ * The `HttpProxyAgent` implements an HTTP Agent subclass that connects

class HttpProxyAgent extends agent_base_1.Agent {
get secureProxy() {
return isHTTPS(this.proxy.protocol);
}
constructor(proxy, opts) {

@@ -58,3 +52,3 @@ super(opts);

? parseInt(this.proxy.port, 10)
: this.secureProxy
: this.proxy.protocol === 'https:'
? 443

@@ -128,3 +122,3 @@ : 80;

let socket;
if (this.secureProxy) {
if (this.proxy.protocol === 'https:') {
debug('Creating `tls.Socket`: %o', this.connectOpts);

@@ -131,0 +125,0 @@ socket = tls.connect(this.connectOpts);

1

dist/index.d.ts

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

connectOpts: net.TcpNetConnectOpts & tls.ConnectionOptions;
get secureProxy(): boolean;
constructor(proxy: Uri | URL, opts?: HttpProxyAgentOptions<Uri>);

@@ -40,0 +39,0 @@ addRequest(req: HttpProxyAgentClientRequest, opts: AgentConnectOpts): void;

@@ -36,5 +36,2 @@ "use strict";

const debug = (0, debug_1.default)('http-proxy-agent');
function isHTTPS(protocol) {
return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false;
}
/**

@@ -45,5 +42,2 @@ * The `HttpProxyAgent` implements an HTTP Agent subclass that connects

class HttpProxyAgent extends agent_base_1.Agent {
get secureProxy() {
return isHTTPS(this.proxy.protocol);
}
constructor(proxy, opts) {

@@ -58,3 +52,3 @@ super(opts);

? parseInt(this.proxy.port, 10)
: this.secureProxy
: this.proxy.protocol === 'https:'
? 443

@@ -128,3 +122,3 @@ : 80;

let socket;
if (this.secureProxy) {
if (this.proxy.protocol === 'https:') {
debug('Creating `tls.Socket`: %o', this.connectOpts);

@@ -131,0 +125,0 @@ socket = tls.connect(this.connectOpts);

{
"name": "http-proxy-agent",
"version": "6.1.1",
"version": "7.0.0",
"description": "An HTTP(s) proxy `http.Agent` implementation for HTTP",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc