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

proxy-chain

Package Overview
Dependencies
Maintainers
4
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proxy-chain - npm Package Compare versions

Comparing version 0.1.28 to 0.1.29

10

build/handler_base.js

@@ -193,12 +193,2 @@ 'use strict';

}
}, {
key: 'maybeAddProxyAuthorizationHeader',
value: function maybeAddProxyAuthorizationHeader(headers) {
var parsed = this.upstreamProxyUrlParsed;
if (parsed && parsed.username) {
var auth = parsed.username;
if (parsed.password) auth += ':' + parsed.password;
headers['Proxy-Authorization'] = 'Basic ' + Buffer.from(auth).toString('base64');
}
}

@@ -205,0 +195,0 @@ /**

2

build/handler_forward.js

@@ -116,3 +116,3 @@ 'use strict';

this.maybeAddProxyAuthorizationHeader(reqOpts.headers);
(0, _tools.maybeAddProxyAuthorizationHeader)(this.upstreamProxyUrlParsed, reqOpts.headers);

@@ -119,0 +119,0 @@ this.log('Connecting to upstream proxy ' + reqOpts.host + ':' + reqOpts.port);

@@ -17,2 +17,4 @@ 'use strict';

var _tools = require('./tools');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -60,3 +62,3 @@

this.maybeAddProxyAuthorizationHeader(options.headers);
(0, _tools.maybeAddProxyAuthorizationHeader)(this.upstreamProxyUrlParsed, options.headers);

@@ -63,0 +65,0 @@ this.trgRequest = _http2.default.request(options);

@@ -13,2 +13,4 @@ 'use strict';

var _tools = require('./tools');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -77,3 +79,3 @@

this.maybeAddProxyAuthorizationHeader(options.headers);
(0, _tools.maybeAddProxyAuthorizationHeader)(this.upstreamProxyUrlParsed, options.headers);

@@ -189,12 +191,2 @@ this.trgRequest = _http2.default.request(options);

}
}, {
key: 'maybeAddProxyAuthorizationHeader',
value: function maybeAddProxyAuthorizationHeader(headers) {
var parsed = this.upstreamProxyUrlParsed;
if (parsed && parsed.username) {
var auth = parsed.username;
if (parsed.password) auth += ':' + parsed.password;
headers['Proxy-Authorization'] = 'Basic ' + Buffer.from(auth).toString('base64');
}
}

@@ -201,0 +193,0 @@ /**

@@ -6,3 +6,3 @@ 'use strict';

});
exports.findFreePort = exports.PORT_SELECTION_CONFIG = exports.addHeader = exports.parseProxyAuthorizationHeader = exports.redactParsedUrl = exports.redactUrl = exports.parseUrl = exports.isInvalidHeader = exports.isHopByHopHeader = exports.parseHostHeader = undefined;
exports.maybeAddProxyAuthorizationHeader = exports.findFreePort = exports.PORT_SELECTION_CONFIG = exports.addHeader = exports.parseProxyAuthorizationHeader = exports.redactParsedUrl = exports.redactUrl = exports.parseUrl = exports.isInvalidHeader = exports.isHopByHopHeader = exports.parseHostHeader = undefined;

@@ -213,2 +213,10 @@ var _url = require('url');

});
};
var maybeAddProxyAuthorizationHeader = exports.maybeAddProxyAuthorizationHeader = function maybeAddProxyAuthorizationHeader(parsedUrl, headers) {
if (parsedUrl && parsedUrl.username) {
var auth = parsedUrl.username;
if (parsedUrl.password || parsedUrl.password === '') auth += ':' + parsedUrl.password;
headers['Proxy-Authorization'] = 'Basic ' + Buffer.from(auth).toString('base64');
}
};

@@ -0,1 +1,5 @@

0.1.29 / 2018-04-15
===================
- Fix: anonymizeProxy() now supports upstream proxies with empty password
0.1.27 / 2018-03-27

@@ -2,0 +6,0 @@ ===================

{
"name": "proxy-chain",
"version": "0.1.28",
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication and upstream proxy chaining.",
"version": "0.1.29",
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication, upstream proxy chaining, and protocol tunneling.",
"main": "build/index.js",

@@ -9,3 +9,4 @@ "keywords": [

"squid",
"apify"
"apify",
"tunnel"
],

@@ -12,0 +13,0 @@ "author": {

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