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

ssh-remote-port-forward

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssh-remote-port-forward - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

dist/SshConnection.d.ts

@@ -5,3 +5,3 @@ import { Client } from "ssh2";

constructor(client: Client);
remoteForward(port: number): Promise<void>;
remoteForward(remoteAddress: string, remotePort: number): Promise<void>;
ref(): void;

@@ -8,0 +8,0 @@ unref(): void;

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

}
remoteForward(port) {
remoteForward(remoteAddress, remotePort) {
return __awaiter(this, void 0, void 0, function* () {
yield new Promise((resolve, reject) => {
this.client.forwardIn("127.0.0.1", port, (err) => {
this.client.forwardIn(remoteAddress, remotePort, (err) => {
if (err) {

@@ -23,0 +23,0 @@ reject(err);

{
"name": "ssh-remote-port-forward",
"author": "Cristian Greco",
"version": "1.0.1",
"version": "1.0.2",
"main": "dist/index",

@@ -6,0 +6,0 @@ "types": "dist/index",

@@ -18,6 +18,8 @@ # SSH Remote Port Forward

```typescript
import { createSshConnection, SshConnection, ConnectConfig } from "ssh-remote-port-forward";
import {
createSshConnection,
SshConnection,
ConnectConfig
} from "ssh-remote-port-forward";
const localServerPort = 8000;
const connectConfig: ConnectConfig = {

@@ -28,5 +30,7 @@ host: "example",

const sshConnection: SshConnection = await createSshConnection(connectConfig);
const sshConnection: SshConnection = await createSshConnection(
connectConfig
);
await sshConnection.remoteForward(localServerPort)
await sshConnection.remoteForward("localhost", 8000)
```
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