mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-23 16:42:19 +00:00
* Codex worktree snapshot: startup-cleanup Co-authored-by: Codex * fix(browser): close malformed proxy connections without a reply * feat(browser): embed host browsing in terminal side panels * style(browser): blend compact browser chrome into terminal panels * feat(browser): open terminal links internally with a system browser preference * fix(browser): retain the first terminal link during panel mount replay * fix(browser): release contexts when their split pane closes * style(browser): remove the downloads panel shadow * fix(browser): ignore late downloads after panel closure * fix(browser): mount browser content on terminal auto-open * fix(browser): preserve empty-vault recovery with bookmarks * fix(browser): expose actions for supported terminal types * fix(browser): retain open requests before the panel mounts * fix(browser): align vault actions with supported hosts * fix(browser): share download controls across host contexts * fix(browser): keep vault browser requests on visible sessions * fix(browser): release contexts after workspace detach * fix(browser): enforce WebRTC routing on page contents * fix(browser): skip unsupported sessions in open requests * style(browser): encode glyphs in ASCII-safe source
33 lines
6.9 KiB
Markdown
33 lines
6.9 KiB
Markdown
# WaveTerm embedded browser and remote localhost
|
|
|
|
Checked 2026-09-29. Scope: WaveTerm's own website/docs, GitHub discussions/issues, and the 2026-09-25 source commit `c58bf7f346d0a638f3e5d7c77b2688122d36fede`. No runtime verification.
|
|
|
|
## Confirmed user workflow
|
|
|
|
- Wave has an **inline web browser** for sites, dashboards, and apps. Its website says web views can be arranged alongside terminals and editors. The docs say the right-side widget bar adds a web widget to the **current tab**; widgets can be moved, resized, and magnified. [Website](https://www.waveterm.dev/) · [Widgets](https://docs.waveterm.dev/widgets)
|
|
- A user can enter a URL in the web widget, or run `wsh web open <url>` from a Wave terminal. `wsh web open` creates a web block; `-m` magnifies it and `-r <blockid>` replaces an existing block. The docs' local development example starts a server and then opens `http://localhost:3000` in a web block. [wsh overview](https://docs.waveterm.dev/wsh) · [wsh reference](https://docs.waveterm.dev/wsh-reference)
|
|
- Web navigation has a URL field, back/forward, reload, in-page find, and bookmarks; the documented shortcuts include `Alt+L`, `Alt+Left/Right`, `Alt+R`, `Alt+F`, and `Alt+O`. A home page can be set globally or per widget. `web:openlinksinternally=false` sends web links to an external browser. [Key bindings](https://docs.waveterm.dev/keybindings) · [Custom widgets](https://docs.waveterm.dev/customwidgets) · [Configuration](https://docs.waveterm.dev/config)
|
|
|
|
## Remote `127.0.0.1`: not established as automatic
|
|
|
|
- **Confirmed:** Wave's SSH connection picker opens a remote terminal. With `wsh` installed, the remote can also back file-preview and system-info widgets, and a remote shell can control Wave widgets. The [Connections](https://docs.waveterm.dev/connections) page does **not** list the web widget as a connection-backed widget. The [wsh overview](https://docs.waveterm.dev/wsh) puts `wsh web open http://localhost:3000` under *Development Workflow* and lists SSH under a separate *Remote Development* example; it does not say the first command retargets localhost to an SSH host.
|
|
- **Best reading, still an inference:** entering `http://127.0.0.1:<port>` in Wave's web widget addresses the machine running the desktop app unless the user has separately made the remote port reachable. Do **not** describe SSH remote loopback as auto-forwarded from these docs. A [May 2026 feature request](https://github.com/wavetermdev/waveterm/issues/3276) explicitly asks for a port-forwarding widget to avoid typing `ssh -L 3000:localhost:3000 user@server`; it was still open with no linked closing PR when checked on 2026-09-29. That request supports the gap but is not, by itself, proof of current behavior.
|
|
- **Candidate manual workflow, inferred from that request:** create a local SSH tunnel such as `ssh -L 3000:localhost:3000 user@server`, then open `http://127.0.0.1:3000` in Wave's web block. This requires a working tunnel and an available local port; the reviewed docs do not present it as an integrated Wave flow. [Port-forwarding request](https://github.com/wavetermdev/waveterm/issues/3276) · [wsh web command](https://docs.waveterm.dev/wsh-reference)
|
|
- **Different forwarding path:** the [Connections troubleshooting guide](https://docs.waveterm.dev/connections) says SSH server TCP forwarding settings can affect `wsh`; a [GitHub discussion](https://github.com/wavetermdev/waveterm/discussions/2757) reports `wsh` failing where stream-local forwarding is denied. Neither source establishes automatic forwarding of arbitrary HTTP ports to the browser.
|
|
|
|
## Source-code check at the pinned commit
|
|
|
|
- [`wsh web open`](https://github.com/wavetermdev/waveterm/blob/c58bf7f346d0a638f3e5d7c77b2688122d36fede/cmd/wsh/cmd/wshcmd-web.go#L100-L139) creates a web block containing the supplied URL. It does not resolve the current SSH host or request a forward in this command path.
|
|
- The [web block](https://github.com/wavetermdev/waveterm/blob/c58bf7f346d0a638f3e5d7c77b2688122d36fede/frontend/app/view/webview/webview.tsx#L1106-L1121) uses Electron's `<webview>` to load its URL; its [navigation path](https://github.com/wavetermdev/waveterm/blob/c58bf7f346d0a638f3e5d7c77b2688122d36fede/frontend/app/view/webview/webview.tsx#L393-L470) normalizes the scheme and passes the resulting URL directly to the webview. **Inference from these paths:** `localhost` resolves on the computer running Wave, even when `wsh web open` is invoked in an SSH terminal. This is not a live acceptance test.
|
|
- The web block implements [address, back/forward, reload, external-open](https://github.com/wavetermdev/waveterm/blob/c58bf7f346d0a638f3e5d7c77b2688122d36fede/frontend/app/view/webview/webview.tsx#L127-L213) and [load-error feedback](https://github.com/wavetermdev/waveterm/blob/c58bf7f346d0a638f3e5d7c77b2688122d36fede/frontend/app/view/webview/webview.tsx#L1011-L1050). Popups are intercepted by the [host tab](https://github.com/wavetermdev/waveterm/blob/c58bf7f346d0a638f3e5d7c77b2688122d36fede/emain/emain-tabview.ts#L315-L324) and converted into Wave's link-opening flow.
|
|
- Wave uses an Electron `<webview>` tag. [Electron's current guidance](https://www.electronjs.org/docs/latest/api/webview-tag) advises considering alternatives such as `WebContentsView`; Netcatty should copy the workspace interaction, not assume the exact embedding mechanism is the best current choice.
|
|
|
|
## Security and limits of the evidence
|
|
|
|
- The website says Wave stores user data locally and needs no account; that is a general product statement, **not** a browser-specific guarantee about cookies, site isolation, permissions, or proxying. The browser docs found here do not specify those protections or a remote-URL trust policy. [Website](https://www.waveterm.dev/) · [Configuration](https://docs.waveterm.dev/config)
|
|
- Web links can be opened externally, but an [older GitHub report](https://github.com/wavetermdev/waveterm/issues/1733) said the external-browser button picked Chrome instead of the system default on Ubuntu; it is version-specific and should not be generalized. A [v0.14.5 macOS report](https://github.com/wavetermdev/waveterm/issues/3428) describes unresponsiveness when switching between two web blocks; it is a report, not a confirmed universal limitation.
|
|
|
|
**Practical conclusion:** the documented product is a browser block beside terminal blocks. The reviewed first-party material does not confirm automatic SSH forwarding for a service bound to remote `127.0.0.1`; treat that behavior as unverified until tested in the app or confirmed by a direct WaveTerm statement.
|
|
|
|
For Netcatty issue [#2972](https://github.com/binaricat/Netcatty/issues/2972), the reusable product idea is a resizable web pane beside the terminal, with address, navigation, expand, and clear load errors. The distinct requirement is automatically connecting that pane to the selected SSH host's private web service, showing which host `127.0.0.1` refers to, and releasing the temporary access path when the pane closes. These are design recommendations, not claims about Wave's behavior.
|