Socket
Socket
Sign inDemoInstall

coin-hive-stratum

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coin-hive-stratum - npm Package Compare versions

Comparing version 2.1.4 to 2.2.1

20

build/Proxy.js

@@ -49,3 +49,3 @@ "use strict";

}
Proxy.prototype.listen = function (port) {
Proxy.prototype.listen = function (port, host, callback) {
var _this = this;

@@ -117,3 +117,14 @@ // create server

});
this.server.listen(port);
if (!host && !callback) {
this.server.listen(port);
}
else if (!host && callback) {
this.server.listen(port, callback);
}
else if (host && !callback) {
this.server.listen(port, host);
}
else {
this.server.listen(port, host, callback);
}
console.log("listening on port " + port + (isHTTPS ? ", using a secure connection" : ""));

@@ -156,2 +167,5 @@ if (wssOptions.path) {

};
Proxy.prototype.isEmpty = function (connection) {
return connection.miners.length === 0 && connection.donations.length === 0;
};
Proxy.prototype.getStats = function () {

@@ -185,3 +199,3 @@ var _this = this;

var connections = _this.connections[connectionId];
var availableConnection = connections.filter(function (connection) { return _this.isAvailable(connection); });
var availableConnection = connections.filter(function (connection) { return _this.isEmpty(connection); });
var unusedConnections = availableConnection.slice(1);

@@ -188,0 +202,0 @@ unusedConnections.forEach(function (unusedConnection) {

2

package.json
{
"name": "coin-hive-stratum",
"version": "2.1.4",
"version": "2.2.1",
"description": "proxy to use CoinHive miner on any stratum pool",

@@ -5,0 +5,0 @@ "main": "build",

@@ -69,3 +69,3 @@ import * as WebSocket from "ws";

listen(port: number): void {
listen(port: number, host?: string, callback?: () => void): void {
// create server

@@ -136,3 +136,11 @@ const isHTTPS = !!(this.key && this.cert);

});
this.server.listen(port);
if (!host && !callback) {
this.server.listen(port);
} else if (!host && callback) {
this.server.listen(port, callback);
} else if (host && !callback) {
this.server.listen(port, host);
} else {
this.server.listen(port, host, callback);
}
console.log(`listening on port ${port}` + (isHTTPS ? ", using a secure connection" : ""));

@@ -139,0 +147,0 @@ if (wssOptions.path) {

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