@mongodb-js/ssh-tunnel
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package