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
add: Tor anti-censorship with failsafe, obfs4 bridges, and advanced UI
Always-on failsafe: when Tor is enabled but inactive (mid-bootstrap, mid-toggle,
post-failure), all relay and HTTP traffic routes to a blackhole proxy instead
of leaking to clearnet. Cache flip happens after stop, never before.
Per-account lifecycle: TorService stops on logout, account switch, and account
create, then restarts with the new account's preference. SOCKS task drains via
JoinSet so state-dir locks release deterministically before runtime drop.
Bridges with obfs4: vanilla and obfs4 supported via arti's pluggable transport
layer. Bridge reconfigure uses arti's Reconfigure::AllOrNothing then re-bootstraps
in place (no stop+start lock contention). System-installed obfs4proxy with inline
detection banner and per-OS install hints. Auto-disables bridges when obfs4 lines
exist but obfs4proxy is missing, falling back to direct Tor.
Compile-time leak prevention: clippy disallowed_methods lint blocks raw reqwest
client construction in first-party code, forcing all HTTP through the canonical
build_http_client path that respects transport state.
Per-stream isolation: each relay socket and HTTP request gets a fresh
IsolationToken. Token rotates on circuit rebuild and bridge reconfigure so
post-cycle traffic doesn't share circuits with pre-cycle.
Advanced UI: live circuit display with rail and traveling pulse, hop position
labels, fingerprint hex with hover-to-full, rebuild button, bridges section
with horizontal-scroll textarea and apply-on-diff. Login lockscreen shows
"Bootstrapping Tor NN%" while the first connection establishes.
Android background sync: Tor lifecycle integrated. After client.disconnect,
stop_and_join_if_running awaits SOCKS drain before the transient runtime drops.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Forbid raw reqwest::Client construction outside the canonical entry point.
2
+
# `vector_core::net::build_http_client` honors the Tor failsafe (proxy when
3
+
# Tor is up, blackhole when Tor is enabled-but-bootstrapping). Bypassing it
4
+
# can leak clearnet traffic when the user has Tor enabled.
5
+
disallowed-methods = [
6
+
{ path = "reqwest::Client::new", reason = "Use vector_core::net::build_http_client so the Tor failsafe applies (or annotate this call site with #[allow(clippy::disallowed_methods)] if you genuinely need a raw client and have audited why it's safe)." },
7
+
{ path = "reqwest::Client::builder", reason = "Use vector_core::net::build_http_client so the Tor failsafe applies." },
8
+
{ path = "reqwest::ClientBuilder::new", reason = "Use vector_core::net::build_http_client so the Tor failsafe applies." },
0 commit comments