Skip to content

fix(#701): egress panel no longer reports a phantom clearnet leak for the XvB stats fetch - #702

Merged
VijitSingh97 merged 5 commits into
developfrom
claude/exciting-poincare-c6ae1c
Jul 21, 2026
Merged

fix(#701): egress panel no longer reports a phantom clearnet leak for the XvB stats fetch#702
VijitSingh97 merged 5 commits into
developfrom
claude/exciting-poincare-c6ae1c

Conversation

@VijitSingh97

Copy link
Copy Markdown
Collaborator

Closes #701.

What

With xvb.tor: false, the #170 egress-posture panel and topology view showed the dashboard's XvB stats (xmrvsbeast.com) connection as a clearnet leak. That fetch never touches clearnet: main.py constructs XvbClient with no tor_proxy argument, so it defaults to TOR_SOCKS_PROXY — compose-pinned to the bridge Tor SOCKS and not operator-blankable. xvb.tor (XVB_TOR_ENABLED) gates only the xmrig-proxy donation dial's per-pool socks5 (#166). docs/privacy.md already documented the stats fetch as unconditionally Tor (socks5h, #163) — the panel disagreed with both the code and the docs, which is the exact display-vs-reality failure the #160 audit was about (over-warning direction this time, but still a false report).

How

  • service/egress.py: the dashboard's XvB stats route (egress list entry and topology edge) becomes TOR if xvb_enabled else INACTIVE; the xmrig-proxy donation route keeps _xvb_route(xvb_enabled, xvb_tor). The topology edge now always terminates at the tor hub.
  • Three unit tests and one views-level wiring test pinned the phantom leak; they now pin the corrected behaviour (xvb.tor: false + firewall on ⇒ zero leaks, donation dial clearnet-but-blocked). The warning-badge and JSON-serializability wiring tests exercise a real leak config instead (p2pool.clearnet: true + firewall off).
  • New sweep test: across all 2⁹ knob combinations, the dashboard never derives a clearnet connection or edge — its outbound clients are all hard-wired through Tor SOCKS, so the host-networked firewall bypass has nothing clearnet to expose.
  • CHANGELOG ### Fixed entry.

Verification

  • make lint and make test green locally; the exhaustive _KNOBS sweep and frontend topology tests pass unchanged.
  • make test-patch-coverage reports no measurable changed lines (the product-side edits are continuation lines inside the components/edges list literals; behaviour is pinned by the updated + new tests).
  • Adversarially verified: XVB_TOR_ENABLED feeds only algo_service.py and (previously, wrongly) egress.py; TOR_SOCKS_PROXY has defaults in both config.py and docker-compose.yml, so the proxy can't be silently blanked.

Note: #697 touches the same file for the webhook/ntfy sinks; whichever lands second takes a trivial rebase (adjacent additions in the dashboard conns/edges lists).

🤖 Generated with Claude Code

VijitSingh97 and others added 5 commits July 20, 2026 17:40
… the XvB stats fetch

The #170 posture panel and topology view routed the dashboard's XvB
stats connection through _xvb_route(xvb_enabled, xvb_tor), so
xvb.tor: false displayed it as a clearnet leak. That fetch is
unconditionally Tor-proxied (XvbClient defaults tor_proxy to
TOR_SOCKS_PROXY, compose-pinned to the bridge SOCKS); xvb.tor gates
only the xmrig-proxy donation dial (#166). The route is now
TOR if xvb_enabled else INACTIVE, matching the code and
docs/privacy.md. Tests that pinned the phantom leak now pin the
corrected behaviour, plus an all-knobs sweep asserting the dashboard
never derives a clearnet route.

Closes #701

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The all-configs sweep asserted NO dashboard connection is ever clearnet.
That invariant is broader than #701's claim and breaks the moment a
dashboard egress with a legitimate clearnet mode lands (#380's alert-sink
LAN carve-out in flight on another branch derives exactly that). Scope
the sweep to the Tor-hard-wired clients by name — with a drift guard so a
rename can't hollow it out — and pin the topology XvB stats edge as
inactive when XvB is off, which only the posture side asserted before.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VijitSingh97
VijitSingh97 merged commit 4a1b0bb into develop Jul 21, 2026
16 checks passed
VijitSingh97 added a commit that referenced this pull request Jul 21, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VijitSingh97
VijitSingh97 deleted the claude/exciting-poincare-c6ae1c branch July 21, 2026 23:18
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.

Egress panel reports a clearnet leak for the dashboard's XvB stats fetch, which is unconditionally Tor

1 participant