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

ssh-tun

Package Overview
Dependencies
Maintainers
5
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssh-tun - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

5

index.js

@@ -28,2 +28,3 @@ 'use strict';

* @param {string} [opts.identity] private key for public key authentication
* @param {boolean} [opts.compression] use compression
*/

@@ -45,2 +46,3 @@ __constructor: function (opts) {

this._strictHostKeyChecking = opts.strictHostKeyChecking === undefined ? true : opts.strictHostKeyChecking;
this._compression = opts.compression;
this._identity = opts.identity;

@@ -134,2 +136,5 @@ },

this._strictHostKeyChecking === false ? '-o StrictHostKeyChecking=no' : '',
this._compression !== undefined ?
util.format('-o Compression=%s', this._compression ? 'yes' : 'no')
: '',
this._identity ? util.format('-i %s', this._identity) : '',

@@ -136,0 +141,0 @@ util.format('-p %d', this._sshPort),

2

package.json
{
"name": "ssh-tun",
"version": "1.6.0",
"version": "1.7.0",
"description": "Module for establishing ssh tunnel",

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

@@ -145,2 +145,24 @@ var Tunnel = require('../'),

it('should spawn tunnel with "Compression" param if compression is provided', function () {
tunnel = createTunnel({
compression: true
});
tunnel.open();
var sshArgs = childProcess.spawn.lastCall.args[1];
expect(sshArgs).to.contain('-o Compression=yes');
});
it('should spawn tunnel without "Compression" param if compression is undefined', function () {
tunnel = createTunnel();
tunnel.open();
var sshArgs = childProcess.spawn.lastCall.args[1];
expect(sshArgs).to.not.contain('-o Compression');
});
it('should resolve promise if tunnel successfully created', function () {

@@ -147,0 +169,0 @@ tunnel = createTunnel();

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