tunnel-ssh
Advanced tools
Comparing version 0.0.3 to 0.0.4
22
index.js
@@ -1,5 +0,1 @@ | ||
/** | ||
* test to connect to mongoDB via ssh2 | ||
**/ | ||
var Connection = require('ssh2'); | ||
@@ -26,5 +22,5 @@ var net = require('net'); | ||
var self = this; | ||
this.server.close(function(error){ | ||
this.server.close(function (error) { | ||
self.connection.end(); | ||
if(callback){ | ||
if (callback) { | ||
callback(error); | ||
@@ -36,7 +32,13 @@ } | ||
SSHTunnel.prototype.connect = function (callback) { | ||
var self = this; | ||
var remotePort = self._config.remotePort; | ||
var localPort = self._config.localPort; | ||
var c = self.connection = new Connection(); | ||
var self = this, | ||
disabled = self._config.disabled, | ||
remotePort = self._config.remotePort, | ||
localPort = self._config.localPort; | ||
if(disabled){ | ||
return callback(null); | ||
} | ||
var c = self.connection = new Connection(); | ||
c.on('ready', function () { | ||
@@ -43,0 +45,0 @@ |
{ | ||
"name": "tunnel-ssh", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Easy ssh tunneling", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -15,2 +15,3 @@ Tunnel-SSH | ||
verbose: true, // dump information to stdout | ||
disabled: false, //set this to true to disable tunnel (useful to keep architecture for local connections) | ||
sshConfig: { //ssh2 configuration (https://github.com/mscdex/ssh2) | ||
@@ -17,0 +18,0 @@ host: '<yourRemoteIp>', |
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
4828
96
35