@hahahhh/sshx 0.0.3-rc.1 → 0.0.3-rc.3

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/README.md +8 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  **sshx** is a drop-in wrapper around OpenSSH. Wrap it as `alias ssh=sshx` and your existing SSH workflow works exactly as before — every flag, config, and connection passes through verbatim. But when you connect to a host (or Docker container) with sshx-aware features enabled, you unlock a persistent, shared remote server that gives you:
6
6
 
7
7
  - 🔄 **Reverse command bridge** — run `sshx local <cmd>` *on the remote* to execute commands on your local machine, with stdout, stderr, exit code, and stdin all propagated.
8
- - 🔌 **Automatic port forwarding** — remote loopback listeners (e.g., a dev server on `localhost:8080`) are automatically detected and forwarded to your local machine.
8
+ - 🔌 **Automatic port forwarding** — remote local listeners (loopback `127.0.0.1` and wildcard `0.0.0.0`; e.g., a dev server on `0.0.0.0:8080` or `localhost:8080`) are automatically detected and forwarded to your local machine.
9
9
  - 🌐 **Local domain binding** — access forwarded ports as `<host>.<your-user>.sshx:<port>` in your local browser, no manual `-L` flags needed.
10
10
  - 🐳 **Docker container support** — target running containers by name or ID: `sshx my-container`. Command bridge support works inside containers via `docker exec`.
11
11
 
@@ -59,7 +59,7 @@ sshx local pbcopy < /tmp/some-data
59
59
 
60
60
  ### 🔌 Automatic Port Detection & Forwarding
61
61
 
62
- When a process on the remote starts listening on `127.0.0.1` (e.g., `npm run dev` on port 3000), sshx detects it and:
62
+ When a process on the remote starts listening on `127.0.0.1` or `0.0.0.0` (e.g., `npm run dev` on port 3000), sshx detects it and:
63
63
 
64
64
  1. Broadcasts the port to the local daemon.
65
65
  2. Assigns the SSH target its own loopback IP.
@@ -167,12 +167,14 @@ sshx local uname -s
167
167
 
168
168
  ### 3. Start a dev server on the remote
169
169
 
170
- On the remote, start a server listening on `localhost`:
170
+ On the remote, start a server:
171
171
 
172
172
  ```sh
173
- python3 -m http.server 8080 --bind 127.0.0.1
173
+ python3 -m http.server 8080
174
174
  ```
175
175
 
176
+ `python3 -m http.server` binds to `0.0.0.0` by default; sshx detects it the same as a `--bind 127.0.0.1` listener. Explicit `--bind <ip>` to a non-loopback interface is not forwarded.
177
+
176
178
  On your **local** machine, open:
177
179
 
178
180
  ```
@@ -202,7 +204,7 @@ features:
202
204
  # Remote-to-local command bridge (`sshx local <cmd>` on the remote)
203
205
  commandBridge: true
204
206
 
205
- # Auto-detect remote loopback TCP listeners and expose them via
207
+ # Auto-detect remote loopback and wildcard TCP listeners and expose them via
206
208
  # <host>.<user>.sshx:<remote-port>.
207
209
  autoForward: true
208
210
 
@@ -231,7 +233,7 @@ commands:
231
233
 
232
234
  1. **Connection**: `sshx remote` opens a normal SSH session and starts (or connects to) the client-target `sshx server` under `~/.sshx_server/<uuid>`.
233
235
  2. **Bridge channel**: A hidden `socket-proxy` SSH channel links the local daemon to the remote server.
234
- 3. **Port sniffing**: The server reads `/proc/net/tcp*` (Linux) to detect loopback listeners.
236
+ 3. **Port sniffing**: The server reads `/proc/net/tcp*` (Linux) to detect loopback (`127.0.0.1` / `::1`) and wildcard (`0.0.0.0` / `::`) listeners.
235
237
  4. **Forwarding**: Detected ports are forwarded through a single shared local daemon using `ssh -W`.
236
238
  5. **Domains**: The local DNS responder maps `<target>.<suffix>` → localhost. The browser's URL port selects the local forwarded port.
237
239
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hahahhh/sshx",
3
- "version": "0.0.3-rc.1",
3
+ "version": "0.0.3-rc.3",
4
4
  "type": "module",
5
5
  "description": "Transparent SSH enhancement wrapper for OpenSSH",
6
6
  "repository": {