A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.
Rust agentagent-orchestrationaiai-agentsclaude-codecodexcoding-agentlinuxmacosmultiplayermultiplexerrustterminalterminal-emulatorterminal-multiplexertmuxtuiweztermwindows
Clarify browser privacy and test IPs
RoversX402ceb923388
diff --git a/PRIVACY.md b/PRIVACY.mdindex be4b5b56..23d1ec84 100644--- a/PRIVACY.md+++ b/PRIVACY.md@@ -47,6 +47,51 @@ infer any information from it.If you wish, you can disable update checking by setting`check_for_updates = false`.+## Browser Access++ThinkTerm's multiplexer can serve a browser client, so that a phone or+another machine can open the terminals running on this one. It is off+unless you turn it on: no port is opened until a `web_servers` entry is+configured, or until you switch one on in Settings → Web or with+`thinkterm cli web-server on`. Nothing about it reports anywhere. The+page, its JavaScript, its wasm and its fonts are all served by your own+machine, the page makes no request to any third party, and no usage of it+is collected.++A browser is admitted by a web token that you mint yourself with+`thinkterm cli web-token mint`. A token is a login as your user on that+machine: anyone holding it can open a shell and read every pane, so treat+it like an ssh key. The page takes it out of the address bar as soon as it+loads and keeps it in that tab's `sessionStorage`, which the browser+discards when the tab closes.++While a listener is on, ThinkTerm keeps two things on the local disk,+readable by your user only, and sends neither anywhere.++The first is the tokens, and only if a `token_file` is configured: unset+means memory only, and restarting the server forgets every token. What is+written for each is its id, the name you gave it, a sha256 digest of the+token -- never the token itself, so a copied file admits nobody -- when it+was created, when it expires, when it was last used, and a coarse+description of the browser that last used it, taken from the User-Agent it+sent ("iPhone · Safari"). No address of any device that connected is+recorded, and the server's log names the token that was admitted rather+than who used it.++The second is a self-signed certificate and its private key, under+`web-tls/` in ThinkTerm's data directory (`~/.local/share/thinkterm` on+Linux, `~/Library/Application Support/thinkterm` on macOS). It is made+only when you bind a listener off loopback without supplying a certificate+of your own, and it names the machine's hostname and every non-loopback+address it has, so that a browser reaching it by any of them lands in a+secure context. Those names are shown to whoever connects to that port,+which is what a certificate is for; nothing else is in it.++The browser keeps your own choices for that page -- language, theme, font+size, colour scheme, the Space it was showing, panel widths, recent+palette picks -- in its `localStorage`, on your device. Clearing the+site's data forgets them.+## Third-Party BuildsThe above is true of the ThinkTerm source code and the binaries produced bydiff --git a/config/src/web.rs b/config/src/web.rsindex 11d56f23..8451664a 100644--- a/config/src/web.rs+++ b/config/src/web.rs@@ -324,15 +324,15 @@ mod tests {#[test]fn a_listener_bound_everywhere_names_the_machine_s_addresses() {let server = WebServer { bind_address: "0.0.0.0:8443".into(), ..WebServer::default() };- let addrs = vec!["192.168.1.7".parse().unwrap(), "100.100.5.5".parse().unwrap(), "fd7a:115c:a1e0::1".parse().unwrap()];+ let addrs = vec!["192.0.2.7".parse().unwrap(), "100.64.0.1".parse().unwrap(), "fd7a:115c:a1e0::1".parse().unwrap()];assert_eq!(server.url_hosts_with(&addrs),- vec!["127.0.0.1:8443", "localhost:8443", "[::1]:8443", "192.168.1.7:8443", "100.100.5.5:8443"]+ vec!["127.0.0.1:8443", "localhost:8443", "[::1]:8443", "192.0.2.7:8443", "100.64.0.1:8443"]);let v6 = WebServer { bind_address: "[::]:8443".into(), ..WebServer::default() };assert!(v6.url_hosts_with(&addrs).contains(&"[fd7a:115c:a1e0::1]:8443".to_string()));- assert!(is_tailscale(&"100.100.5.5".parse().unwrap()));- assert!(!is_tailscale(&"192.168.1.7".parse().unwrap()));+ assert!(is_tailscale(&"100.64.0.1".parse().unwrap()));+ assert!(!is_tailscale(&"192.0.2.7".parse().unwrap()));}#[test]@@ -411,7 +411,7 @@ mod tests {assert!(is_loopback_host("127.0.0.1"));assert!(is_loopback_host("::1"));assert!(is_loopback_host("LOCALHOST"));- assert!(!is_loopback_host("10.0.0.5"));+ assert!(!is_loopback_host("192.0.2.5"));assert!(!is_loopback_host("localhost.example"));}}diff --git a/wezterm-mux-server-impl/src/web_http.rs b/wezterm-mux-server-impl/src/web_http.rsindex 9199370a..d7673701 100644--- a/wezterm-mux-server-impl/src/web_http.rs+++ b/wezterm-mux-server-impl/src/web_http.rs@@ -957,7 +957,7 @@ mod tests {assert!(matches!(route(&site, &ip), Route::Static(_)));let rebound = request("GET", "/", &[("Host", "evil.example:8088")]);assert_eq!(route(&site, &rebound), reject(403, "Host not served here"));- let wrong_port = request("GET", "/", &[("Host", "10.0.0.5:9999")]);+ let wrong_port = request("GET", "/", &[("Host", "192.0.2.5:9999")]);assert_eq!(route(&site, &wrong_port), reject(403, "Host not served here"));// Through `ssh -L 9000:127.0.0.1:8088`: a loopback name on a port// the listener never heard of is still this machine.diff --git a/wezterm-mux-server-impl/src/web_tls.rs b/wezterm-mux-server-impl/src/web_tls.rsindex f17b7286..1ab5c566 100644--- a/wezterm-mux-server-impl/src/web_tls.rs+++ b/wezterm-mux-server-impl/src/web_tls.rs@@ -148,10 +148,10 @@ mod tests {#[test]fn the_names_always_carry_loopback_and_the_addresses() {- let (dns, ips) = names(&["192.168.1.7".parse().unwrap()]);+ let (dns, ips) = names(&["192.0.2.7".parse().unwrap()]);assert!(dns.contains(&"localhost".to_string()));assert!(ips.contains(&"127.0.0.1".parse().unwrap()));- assert!(ips.contains(&"192.168.1.7".parse().unwrap()));+ assert!(ips.contains(&"192.0.2.7".parse().unwrap()));assert_eq!(base64_decode("aGVsbG8="), Some(b"hello".to_vec()));}