Skip to content

fix(privacy): route Tari clearnet peer dials through Tor SOCKS — genuinely behind Tor (#271)#285

Merged
VijitSingh97 merged 2 commits into
developfrom
feat/271-tari-socks-all
Jun 17, 2026
Merged

fix(privacy): route Tari clearnet peer dials through Tor SOCKS — genuinely behind Tor (#271)#285
VijitSingh97 merged 2 commits into
developfrom
feat/271-tari-socks-all

Conversation

@VijitSingh97

Copy link
Copy Markdown
Collaborator

Closes #271. The substantive Wave 2 item — makes Tari functional and private over Tor, the only app that was previously blocked-but-dead under the #270 firewall.

Root cause (confirmed against tari v5.3.0 source + tari-launchpad)

minotari's tor transport defaults proxy_bypass_for_outbound_tcp = true. With it true, SocksTransport::dial() (comms/core/src/transports/socks.rs:119-128) direct-dials any peer that advertises a bare /ip4|/ip6 .../tcp address, bypassing Tor — and the seed list ships clearnet variants. That's the leak #271 observed (sustained direct connections to public IPs despite type = "tor"). tari-launchpad's own docker_rig/config.toml carries this exact knob.

Fix (build/tari/config.toml.template, one setting)

[base_node.p2p.transport.tor]
proxy_bypass_for_outbound_tcp = false   # route EVERY dial through SOCKS, incl. clearnet peers
proxy_bypass_addresses = []             # no per-address exemptions (no local Tari wallet)

Now clearnet peers are reached via Tor exit nodes, so Tari keeps full connectivity while never touching clearnet directly. Merge-mining is unaffected (base node ↔ MM proxy is local gRPC).

Live validation (gouda, firewall on)

before fix after fix
direct-public connections 2–3 (leak) 0
peer dials via Tor SOCKS ~1 (onion only) up to 36
peer connectivity blocked-dead (3 vs 44 fail) discovering + dialing peers over Tor

Tari now routes 100% of outbound through Tor and is back to actively connecting to peers (handshakes are slow/flaky over Tor — the latency cost #256 will quantify). Combined with the existing dead-resolver DNS sinkhole (#162), Tari has no clearnet TCP and no clearnet DNS — genuinely, completely behind Tor.

Tests: tests/stack/run.sh asserts the config (full suite green). Note: applies on pithead upgrade (re-renders service configs); pithead apply only re-renders on .env changes.

Follow-ups (not blocking)

  • Two upstream items worth filing on tari-project/tari: the privacy-hostile proxy_bypass_for_outbound_tcp=true default under type="tor", and Tari Pulse having no disable flag (we already sinkhole its DNS).

🤖 Generated with Claude Code

VijitSingh97 and others added 2 commits June 16, 2026 23:31
…pass_for_outbound_tcp=false)

minotari's tor transport defaults proxy_bypass_for_outbound_tcp=true, so SocksTransport::dial()
direct-dials any peer that advertises a bare /ip4|/ip6 .../tcp address (the seed list ships clearnet
variants) — bypassing Tor and leaking the home IP, observed live as sustained connections to public
IPs despite type="tor". Setting it false routes every non-onion dial through the SOCKS proxy, so Tari
reaches those peers via Tor exit nodes: fully functional AND never touching clearnet directly. Keep
proxy_bypass_addresses empty (no per-address exemptions; we run no local Tari wallet). Verified against
tari v5.3.0 source (transport.rs:160-212, socks.rs:119-128) and the tari-launchpad docker_rig config.

Residual (tracked separately): Tari Pulse does a checkpoint DNS lookup with no upstream off-switch; the
node tolerates it being blocked. Merge-mining is unaffected (base node ↔ MM proxy over local gRPC).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…xy_bypass_for_outbound_tcp=false)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@VijitSingh97 VijitSingh97 merged commit 5509c78 into develop Jun 17, 2026
11 checks passed
@VijitSingh97 VijitSingh97 deleted the feat/271-tari-socks-all branch June 17, 2026 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tari (minotari) dials some peers over clearnet despite transport type = "tor"

1 participant