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.33 to 0.1.34

14

build/handler_base.js

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

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

@@ -206,3 +208,3 @@

if (this.upstreamProxyUrlParsed && response.statusCode === 407) {
this.fail('Invalid credentials provided for the upstream proxy.', 502);
this.fail(new _server.RequestError('Invalid credentials provided for the upstream proxy.', 502));
return true;

@@ -214,10 +216,10 @@ }

key: 'fail',
value: function fail(err, statusCode) {
value: function fail(err) {
if (this.srcGotResponse) {
this.log('Source already received a response, just destroying the socket...');
this.close();
} else if (statusCode) {
// Manual error
this.log(err + ', responding with custom status code ' + statusCode + ' to client');
this.srcResponse.writeHead(statusCode);
} else if (err.statusCode) {
// Error is RequestError with HTTP status code
this.log(err + ', responding with custom status code ' + err.statusCode + ' to client');
this.srcResponse.writeHead(err.statusCode);
this.srcResponse.end('' + err);

@@ -224,0 +226,0 @@ } else if (err.code === 'ENOTFOUND' && !this.upstreamProxyUrlParsed) {

@@ -533,3 +533,4 @@ 'use strict';

* It is passed to `prepareRequestFunction` function.
* @return {Object} statistics { srcTxBytes, srcRxBytes, trgTxBytes, trgRxBytes }
* @return {Object} An object with statistics { srcTxBytes, srcRxBytes, trgTxBytes, trgRxBytes },
* or null if connection does not exist or has been closed.
*/

@@ -536,0 +537,0 @@

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

0.1.34 / 2018-06-08
===================
- Minor improvement: HandlerBase.fail() now supports RequestError
0.1.33 / 2018-06-08

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

{
"name": "proxy-chain",
"version": "0.1.33",
"version": "0.1.34",
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication, upstream proxy chaining, and protocol tunneling.",

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

@@ -95,3 +95,3 @@ # Programmable HTTP proxy server for Node.js

// Optional HTTP headers of the response
headers: {}
headers: {
'X-My-Header': 'bla bla',

@@ -98,0 +98,0 @@ }

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