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

@mongodb-js/ssh-tunnel

Package Overview
Dependencies
Maintainers
30
Versions
432
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mongodb-js/ssh-tunnel - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

6

lib/index.d.ts

@@ -5,9 +5,9 @@ /// <reference types="node" />

declare type ForwardOutConfig = {
srcHost: string;
srcAddr: string;
srcPort: number;
dstHost: string;
dstAddr: string;
dstPort: number;
};
declare type LocalProxyServerConfig = {
localHost: string;
localAddr: string;
localPort: number;

@@ -14,0 +14,0 @@ };

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

/* eslint-disable @typescript-eslint/no-unused-vars */
srcHost, srcPort, dstHost, dstPort, localHost, localPort,
srcAddr, srcPort, dstAddr, dstPort, localAddr, localPort,
/* eslint-enable @typescript-eslint/no-unused-vars */

@@ -21,7 +21,7 @@ ...connectConfig } = config;

srcPort: 0,
srcHost: '127.0.0.1',
dstHost: '127.0.0.1',
srcAddr: '127.0.0.1',
dstAddr: '127.0.0.1',
dstPort: connectConfig.port,
}, {
localHost: '127.0.0.1',
localAddr: '127.0.0.1',
localPort: connectConfig.port,

@@ -40,5 +40,5 @@ }, config);

sshClient.on('ready', async () => {
const { srcHost, srcPort, dstHost, dstPort } = this.rawConfig;
const { srcAddr, srcPort, dstAddr, dstPort } = this.rawConfig;
try {
const channel = await forwardOut(srcHost, srcPort, dstHost, dstPort);
const channel = await forwardOut(srcAddr, srcPort, dstAddr, dstPort);
socket.pipe(channel).pipe(socket);

@@ -88,4 +88,4 @@ }

const serverListen = util_1.promisify(this.server.listen.bind(this.server));
const { localPort, localHost } = this.rawConfig;
await serverListen(localPort, localHost);
const { localPort, localAddr } = this.rawConfig;
await serverListen(localPort, localAddr);
}

@@ -92,0 +92,0 @@ async close() {

{
"name": "@mongodb-js/ssh-tunnel",
"version": "1.0.1",
"version": "1.0.2",
"description": "Yet another ssh tunnel based on ssh2",

@@ -5,0 +5,0 @@ "main": "lib/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