You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bearer and temporary-link tokens must be at least 8 characters. They are stored only as SHA-256 hashes and are not written into Deployment args. Temporary links use `?_sealtun_token=...`; Sealtun strips that query parameter before forwarding the request to your local service. IP rules prefer the `X-Real-IP` value set by the Ingress/proxy and fall back to the nearest `X-Forwarded-For` hop. When Basic Auth and Bearer/temporary tokens are both configured, either authentication method can grant access.
185
+
Bearer and temporary-link tokens must be at least 8 characters. They are stored only as SHA-256 hashes and are not written into Deployment args. Temporary links use `?_sealtun_token=...`; Sealtun strips that query parameter before forwarding the request to your local service. IP rules prefer the `X-Real-IP` value set by the Ingress/proxy and fall back to the last valid proxy-confirmed client IP in `X-Forwarded-For`. When Basic Auth and Bearer/temporary tokens are both configured, either authentication method can grant access.
186
186
187
187
Sealtun will:
188
188
1. Spin up a tunnel proxy Pod in your Sealos namespace.
189
189
2. Establish the Ingress routes.
190
190
3. Automatically connect via WebSockets and proxy all L7 connections back to `localhost:3000`.
191
191
192
-
### 3. Use a custom domain
192
+
### 3. Public SSH access
193
+
If the Sealos region supports public TCP NodePort, use the L4 SSH mode to connect directly to the public host and port:
194
+
195
+
```bash
196
+
# macOS/Linux commonly use port 22; replace it if your local sshd listens elsewhere
197
+
sealtun expose 22 --protocol ssh
198
+
```
199
+
200
+
The command prints a public SSH endpoint:
201
+
```bash
202
+
ssh <user>@<public-host> -p <node-port>
203
+
```
204
+
205
+
Or add an SSH config entry and then run `ssh sealtun-dev`:
206
+
```sshconfig
207
+
Host sealtun-dev
208
+
HostName <public-host>
209
+
User <user>
210
+
Port <node-port>
211
+
```
212
+
213
+
`--protocol ssh` exposes only a public TCP NodePort for user traffic and does not provide a default HTTPS application URL. Sealtun still keeps an internal control channel so the local daemon can connect to the remote pod, but that channel is not a user-facing SSH entry. Basic Auth, Bearer tokens, temporary links, IP policies, and custom domains apply only to HTTPS tunnels, not to the L4 SSH entry. The older WebSocket ProxyCommand fallback remains available:
Create the tunnel first and print the Sealos-managed CNAME target:
194
221
```bash
195
222
sealtun expose 3000 --domain app.example.com
@@ -311,14 +338,15 @@ basicAuth:
311
338
312
339
## Architecture Details
313
340
314
-
- **Protocol**: Yamux over Websocket.
341
+
- **HTTPS tunnel protocol**: Yamux over WebSocket.
342
+
- **SSH L4 entry**: `--protocol ssh` exposes only a public TCP NodePort that connects directly to local SSH; HTTPS is kept only as an internal control channel, not as a default application URL.
315
343
- **Sealos Resources**: When you trigger `sealtun expose`, it creates `sealtun-*` variants of `Deployment`, `Service`, and `Ingress` in the active cluster context.
316
344
- **Images**: Relies on a single Docker image built natively targeting `ghcr.io/gitlayzer/sealtun`.
317
345
318
346
## Hardening Notes
319
347
320
348
- `expose`now validates port and protocol inputs before provisioning remote resources.
321
-
- `--protocol`currently supports only `https`. TCP, UDP, and gRPC are intentionally out of scope until there is a dedicated transport design for them.
349
+
- `--protocol`currently supports `https` and the dedicated `ssh` mode. `ssh` does not support Basic Auth, Bearer tokens, temporary links, IP policies, or custom domains. Generic TCP, UDP, and gRPC are intentionally out of scope until there is a dedicated transport design for them.
322
350
- `profile`supports named login bundles for multiple accounts, regions, and workspaces; `profile use` switches the active kubeconfig used by later `expose`, `status`, and `region current` commands.
323
351
- Ingress host generation prefers the `SEALOS_DOMAIN` returned by Sealos Launchpad instead of guessing from the region host.
324
352
- Custom domains must pass CNAME ownership verification before Sealtun writes the custom host to Ingress, preventing unverified host preemption on shared Ingress controllers.
- Local controls include `status`, `list`, `inspect`, `doctor`, `stop`, `start/resume`, `cleanup`, and `logout`.
362
+
- `stop`only scales the remote tunnel pod Deployment to zero, preserving the domain, Service, Ingress, secrets, and local session. Use `sealtun start <tunnel-id>` to reopen it. `cleanup` deletes stopped, expired, or stale tunnels by default; `cleanup --all` is the force path for deleting every locally tracked tunnel.
333
363
- `list`reads local session records by default; use `list --check` to probe local target ports and report degraded sessions.
334
364
- `inspect`shows local session state by default; use `inspect --remote` to include best-effort Kubernetes diagnostics.
335
365
- `doctor`summarizes daemon, login, session, local port, and remote Deployment, Service, Ingress, Pod, and Event diagnostics.
0 commit comments