api-response-manager 2.6.6 → 2.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/tunnel.js +11 -7
- package/package.json +1 -1
package/commands/tunnel.js
CHANGED
|
@@ -612,17 +612,21 @@ function startLocalTcpProxy(subdomain, remoteHost, remotePort, silent) {
|
|
|
612
612
|
});
|
|
613
613
|
});
|
|
614
614
|
|
|
615
|
-
// Listen on port 0 to get a random available port
|
|
616
|
-
localProxyServer.listen(0, '
|
|
615
|
+
// Listen on port 0 to get a random available port, bind to 0.0.0.0 for network access
|
|
616
|
+
localProxyServer.listen(0, '0.0.0.0', () => {
|
|
617
617
|
const localPort = localProxyServer.address().port;
|
|
618
618
|
|
|
619
619
|
if (!silent) {
|
|
620
620
|
console.log(chalk.yellow.bold('🔌 SSH/TCP Tunnel Ready!\n'));
|
|
621
|
-
|
|
622
|
-
console.log(chalk.
|
|
623
|
-
console.log(chalk.
|
|
624
|
-
|
|
625
|
-
console.log(chalk.
|
|
621
|
+
|
|
622
|
+
console.log(chalk.white.bold(' 📋 Share this command with anyone to connect:\n'));
|
|
623
|
+
console.log(chalk.cyan.bold(` ssh -o ProxyCommand="sh -c 'printf \\"SUBDOMAIN:${subdomain}\\\\n\\"; exec nc %h %p'" <username>@${remoteHost} -p ${remotePort}\n`));
|
|
624
|
+
|
|
625
|
+
console.log(chalk.white.bold(' 💻 Or connect from this machine:\n'));
|
|
626
|
+
console.log(chalk.cyan(` ssh <username>@localhost -p ${localPort}\n`));
|
|
627
|
+
|
|
628
|
+
console.log(chalk.gray.italic(' Replace <username> with the device\'s SSH username'));
|
|
629
|
+
console.log(chalk.gray.italic(' Requires: nc (netcat) — pre-installed on Linux/Mac/Windows 10+\n'));
|
|
626
630
|
}
|
|
627
631
|
});
|
|
628
632
|
|