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

ssh-tunneling

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssh-tunneling - npm Package Compare versions

Comparing version 1.1.19 to 1.1.20

2

dist/utils.d.ts

@@ -1,2 +0,2 @@

export declare const checkPortAvailable: (port: number) => Promise<unknown>;
export declare const checkPortAvailable: (port: number, host?: string) => Promise<boolean>;
/**

@@ -3,0 +3,0 @@ * @description check whether port is idle and then return another idle port if the port pass in is unavailable

@@ -8,6 +8,6 @@ "use strict";

const net_1 = __importDefault(require("net"));
const checkPortAvailable = (port) => {
const checkPortAvailable = (port, host) => {
return new Promise((resolve) => {
const server = net_1.default.createServer()
.listen(port)
.listen(port, host)
.on('listening', () => {

@@ -32,3 +32,8 @@ resolve(true);

}
const isAvailable = await (0, exports.checkPortAvailable)(port);
// check the *
let isAvailable = await (0, exports.checkPortAvailable)(port);
if (isAvailable) {
// check the localhost
isAvailable = await (0, exports.checkPortAvailable)(port, '127.0.0.1');
}
if (!isAvailable) {

@@ -35,0 +40,0 @@ return (0, exports.getAvailablePort)(port + 1);

{
"private": false,
"name": "ssh-tunneling",
"version": "1.1.19",
"version": "1.1.20",
"description": "a ssh-tunneling client for nodejs",

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

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