ssh-remote-port-forward
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -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) | ||
``` |
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
8056
34