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.
Files changed (2) hide show
  1. package/commands/tunnel.js +11 -7
  2. package/package.json +1 -1
@@ -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, '127.0.0.1', () => {
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
- console.log(chalk.white(' Connect via SSH:\n'));
622
- console.log(chalk.cyan.bold(` ssh <username>@localhost -p ${localPort}\n`));
623
- console.log(chalk.gray(' SSH with Key:'));
624
- console.log(chalk.cyan(` ssh -i ~/.ssh/your_key <username>@localhost -p ${localPort}\n`));
625
- console.log(chalk.gray.italic(` Replace <username> with your device's SSH username\n`));
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "api-response-manager",
3
- "version": "2.6.6",
3
+ "version": "2.6.7",
4
4
  "description": "Command-line interface for API Response Manager",
5
5
  "main": "index.js",
6
6
  "bin": {