Desktop client cannot connect to a self-hosted relay using a private CA (tokio-tungstenite pinned to webpki-roots)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- desktop, networking, security
Research direction
Start with Cargo.toml:123, desktop/src-tauri/Cargo.toml:86, and desktop/src-tauri/src/native_websocket.rs; compare the tokio-tungstenite TLS features and the connect_async(url) call. Reproduce against a relay using a private CA installed in the OS trust store, then verify the desktop WebSocket connects and the connection banner and live message updates work without a rebuild-specific fork.
Written by the indexing model from the issue text.
Description
Describe the bug
The desktop client cannot open a WebSocket to a self-hosted relay whose TLS certificate chains to a private/internal CA.
tokio-tungstenite is pinned to the rustls-tls-webpki-roots feature, which compiles in a fixed list of public CAs and cannot read the OS trust store. native_websocket.rs calls connect_async(url) with no custom Connector, so that feature decides everything and there is no way to supply an internal root.
The symptom is unusually confusing to diagnose: the webview's HTTP requests succeed, because those use system trust. So the app looks functional — you can authenticate, create channels and send messages — while the connection banner is permanently wrong and there is no live push. New messages only appear after a manual refresh. It reads like a server outage, but the client never attempts the WebSocket at all.
Steps to reproduce
- Stand up a self-hosted relay behind TLS with a certificate issued by an internal CA that IS installed in the OS trust store.
- In the desktop client choose "I already have a community" then "I'm a member or admin", and enter the relay URL as
https://relay.example.internal(normalizeRelayUrl maps https to wss). - Authentication succeeds and HTTP-backed actions work, but no WebSocket is ever established. The sidebar shows "Can't reach the relay" while messages still send over HTTP.
Expected behavior
The client should be able to trust a CA that is already present in the operating system's trust store, so a self-hosted relay with an internal certificate works without patching and rebuilding.
Any of these would resolve it:
- switch the feature to
rustls-tls-native-roots - keep webpki-roots and add native roots alongside it
- build a custom
Connectorfrom OS roots, optionally plus an extra CA path supplied by config or env
Version and platform
- Buzz version: 0.5.0 (desktop .deb). Also verified still present on
origin/mainat346ae8cadon 2026-08-07. - OS: Ubuntu 24.04.3 LTS
Logs / additional context
Relevant lines on main today:
Cargo.toml:123—tokio-tungstenite = { version = "0.29", features = ["rustls-tls-webpki-roots"] }desktop/src-tauri/Cargo.toml:86— samedesktop/src-tauri/src/native_websocket.rs—connect_async(url), noConnector
Workaround we are using: change the desktop feature to rustls-tls-native-roots and rebuild. It is a one-line change and it works, but it means maintaining a fork and rebuilding on every release.
Two things that may be worth weighing:
- The self-hosting documentation points at private CAs, so this affects the documented deployment path rather than an exotic setup.
buzz-cliis NOT affected. It is HTTP-only via reqwest → hyper-rustls → rustls-native-certs, so it uses the OS trust store and works against the same relay unpatched. That asymmetry between the CLI and the desktop client is what made this take a while to isolate.
- Dominant language
- Rust
- Stars
- 33.7k
- Forks
- 4.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 239
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from block/buzz
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
workflow_sink's mention parser never masks code regions — @name inside a code span wakes the agent Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 Half a day Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·