Huge News!Announcing our $40M Series B led by Abstract Ventures.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.27 to 0.0.28

4

examples/logger/index.js

@@ -32,4 +32,4 @@ var proxy = require("node-tcp-proxy");

console.log(util.format("Service host %s:%s selected for client %s:%s.",
serviceHosts[parseInt(i)],
servicePorts[parseInt(i)],
serviceHosts[parseInt(i, 10)],
servicePorts[parseInt(i, 10)],
proxySocket.remoteAddress,

@@ -36,0 +36,0 @@ proxySocket.remotePort));

import { Socket } from 'net';
import { TLSSocket } from 'tls';
import { TLSSocket ,TlsOptions} from 'tls';

@@ -44,2 +44,4 @@ // Name or IP address of service host(s); if this is a list, performs round-robin load balancing

allowedIPs: string[];
// Custom tls server options
customTlsOptions: TlsOptions;
serviceHostSelected: (proxySocket: Socket | TLSSocket, i: number) => number;

@@ -46,0 +48,0 @@ upstream: (context: UpstreamContext, data: Buffer) => Buffer;

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

"license": "MIT",
"version": "0.0.27",
"version": "0.0.28",
"main": "index.js",

@@ -8,0 +8,0 @@ "types": "./index.d.ts",

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

if (self.options.tls) {
self.server = tls.createServer(self.proxyTlsOptions, function(socket) {
self.server = tls.createServer(self.options.customTlsOptions || self.proxyTlsOptions, function(socket) {
self.handleClientConnection(socket);

@@ -76,0 +76,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