✨ Add option to allow insecure TLS connections - #39
Open
Reverier-Xu wants to merge 1 commit into
Open
Conversation
Add a settings entry that lets the user disable TLS certificate verification, unconditionally trusting any server certificate when connecting to wss:// remotes. - wsrx tunnel: new `with_insecure_tls` constructor using a custom rustls danger verifier (`Connector::Rustls`); the default `new` keeps full verification and the CLI behavior is unchanged. - desktop config: persist `insecure_tls` in config.toml, disabled by default; thread the flag through instance launching. - latency probe: rebuild the reqwest client when the setting changes so probes follow the same certificate policy as tunnels (avoids pingfall dropping instances over certificate errors). - settings UI: toggle entry (default off) with a danger-colored warning about man-in-the-middle risks. - connections UI: mark wss:// entries with an insecure icon while the option is enabled. - i18n: en_US / zh_CN / zh_TW strings for the new entry and warning.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a settings entry that allows ignoring insecure TLS situations: when enabled, wsrx connects to
wss://remotes without verifying the server certificate, unconditionally trusting any certificate (including self-signed, expired, or hostname-mismatched ones). The option is disabled by default.Changes
wsrxcrate (crates/wsrx/src/tunnel.rs)Tunnel::with_insecure_tls()constructor alongside the existingTunnel::new()(which keeps full verification — CLI behavior is unchanged).danger::ServerCertVerifierthat accepts every certificate. Signature schemes are taken from the process-wide crypto provider (AWS-LC with ring fallback).connect_async_tls_with_configwith a customConnector::Rustlsonly when the insecure option is active.Desktop (
crates/desktop)models.rs: newinsecure_tls: boolfield onWsrxDesktopConfig,#[serde(default)]→ off by default, persisted inconfig.toml.daemon.rs: the flag is read at launch time and threaded into tunnel creation; a warning is logged when the user enables it.daemon/workers.rs: the latency-probe reqwest client follows the same certificate policy and is rebuilt when the setting changes, so probes no longer fail (and pingfall no longer drops instances) purely due to invalid certificates.wss://display an insecure icon (ShieldError, danger color).Screenshots
(UI toggle + warning row; insecure icon marker on
wss://entries)Checklist
cargo check --workspace --all-targetspassescargo clippy— no new warningscargo fmt --checkpasses