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

proxy-chain

Package Overview
Dependencies
Maintainers
2
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.15 to 0.1.16

10

build/handler_base.js

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

}
}, {
key: 'getStats',
value: function getStats() {
return {
srcTxBytes: this.srcSocket ? this.srcSocket.bytesWritten : null,
srcRxBytes: this.srcSocket ? this.srcSocket.bytesRead : null,
trgTxBytes: this.trgSocket ? this.trgSocket.bytesWritten : null,
trgRxBytes: this.trgSocket ? this.trgSocket.bytesRead : null
};
}

@@ -228,0 +238,0 @@ /**

2

build/handler_forward.js

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

_this2.trgSocket = socket;
socket.once('close', function () {

@@ -148,0 +150,0 @@ _this2.log('Target socket closed');

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

* and provide URL to chained upstream proxy. It accepts a single parameter which is an object:
* `{ request: Object, username: String, password: String, hostname: String, port: Number, isHttp: Boolean }`
* `{ connectionId: Number, request: Object, username: String, password: String, hostname: String, port: Number, isHttp: Boolean }`
* and returns an object (or promise resolving to the object) with following form:

@@ -198,3 +198,2 @@ * `{ requestAuthentication: Boolean, upstreamProxyUrl: String }`

this.log(request.method + ' ' + request.url + ' HTTP/' + request.httpVersion);
// console.dir(request.headers);

@@ -276,2 +275,3 @@ this.prepareRequestHandling(request).then(function (handlerOpts) {

var funcOpts = {
connectionId: result.id,
request: request,

@@ -325,2 +325,3 @@ username: null,

});
handler.run();

@@ -437,2 +438,18 @@ }

/**
* Gets data transfer statistics of a specific proxy connection.
* @param {Number} connectionId ID of the connection handler.
* It is passed to `prepareRequestFunction` function.
* @return {Object} statistics { srcTxBytes, srcRxBytes, trgTxBytes, trgRxBytes }
*/
}, {
key: 'getConnectionStats',
value: function getConnectionStats(connectionId) {
var handler = this.handlers && this.handlers[connectionId];
if (!handler) return undefined;
return handler.getStats();
}
/**
* Closes the proxy server.

@@ -439,0 +456,0 @@ * @param [closeConnections] If true, then all the pending connections from clients

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

0.1.16 / 2018-01-09
==================
- added measuring of proxy stats - see `getConnectionStats()`` function
0.1.14 / 2017-12-19

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

2

package.json
{
"name": "proxy-chain",
"version": "0.1.15",
"version": "0.1.16",
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication and upstream proxy chaining.",

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

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