New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-tcp-proxy

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-tcp-proxy - npm Package Compare versions

Comparing version 0.0.13 to 0.0.14

2

.eslintrc.json
{
"parserOptions": {
"ecmaVersion": 6
"ecmaVersion": 5
},

@@ -5,0 +5,0 @@ "plugins": [

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "0.0.13",
"version": "0.0.14",
"main": "index.js",

@@ -16,7 +16,7 @@ "repository": {

"dependencies": {
"commander": "^2.15.1"
"commander": "^2.19.0"
},
"devDependencies": {
"eslint": "^4.0.0",
"eslint-config-google": "^0.8.0",
"eslint": "^4.19.1",
"eslint-config-google": "^0.8.1",
"eslint-plugin-security": "^1.4.0"

@@ -23,0 +23,0 @@ },

@@ -8,3 +8,4 @@ #!/usr/bin/env node

.version(packageConfig.version)
.option("-p, --proxyPort <number>", "Proxy port number", parseInt)
.option("-p, --proxyPort <number>",
"Proxy port number (required)", parseInt)
.option("-h, --hostname [name]", "Name or IP address of host")

@@ -14,6 +15,6 @@ .option("-n, --serviceHost <name>",

"if this is a comma separated list, " +
"proxy performs round-robin load balancing")
"performs round-robin load balancing (required)")
.option("-s, --servicePort <number>", "Service port number(s); " +
"if this a comma separated list," +
"it should have as many entries as serviceHost")
"it should have as many entries as serviceHost (required)")
.option("-q, --q", "Be quiet")

@@ -32,3 +33,3 @@ .option("-t, --tls [both]", "Use TLS 1.2 with clients; " +

hostname: argv.hostname,
quiet: argv.q,
quiet: argv.q,
tls: argv.tls,

@@ -40,3 +41,7 @@ rejectUnauthorized: argv.rejectUnauthorized !== "false",

const proxy = require("./tcp-proxy.js").createProxy(argv.proxyPort,
if (!argv.proxyPort || !argv.serviceHost || !argv.servicePort) {
argv.help();
}
var proxy = require("./tcp-proxy.js").createProxy(argv.proxyPort,
argv.serviceHost, argv.servicePort, options);

@@ -43,0 +48,0 @@

@@ -52,3 +52,3 @@ var net = require("net");

TcpProxy.prototype.createListener = function() {
const self = this;
var self = this;
if (self.options.tls !== false) {

@@ -67,3 +67,3 @@ self.server = tls.createServer(self.proxyTlsOptions, function(socket) {

TcpProxy.prototype.handleClient = function(proxySocket) {
const self = this;
var self = this;
var key = uniqueKey(proxySocket);

@@ -88,6 +88,9 @@ self.proxySockets[key] = proxySocket;

});
proxySocket.on("error", function(e) {
context.serviceSocket.destroy();
});
};
TcpProxy.prototype.createServiceSocket = function(context) {
const self = this;
var self = this;
var i = self.getServiceHostIndex();

@@ -94,0 +97,0 @@ if (self.options.tls === "both") {

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