feat(#170): Component Health panel — per-component egress posture (Tor vs clearnet)#308
Open
VijitSingh97 wants to merge 1 commit into
Open
feat(#170): Component Health panel — per-component egress posture (Tor vs clearnet)#308VijitSingh97 wants to merge 1 commit into
VijitSingh97 wants to merge 1 commit into
Conversation
…r vs clearnet) Adds a dashboard panel + header roll-up badge showing, for every stack component, its outbound connections tagged with the network route the server derives from live config (Tor / clearnet / local / inactive) — the runtime, at-a-glance counterpart to the #160 privacy audit. - service/egress.py: derives each component's connection routes from config (p2pool.clearnet, the #270 firewall, xvb.tor/enabled, monero/tari clearnet-sync, remote-node), never hardcoded. Models the two backstops honestly: the firewall (fail-closed) neutralises a *container's* clearnet route, but NOT the host-networked dashboard's own egress — so disabling XvB-over-Tor is flagged as a real leak even with the firewall on. Summary roll-up: "All egress via Tor" vs "N clearnet paths". - /api/state gains an "egress" key + a header badge (🛡️ Tor-only /⚠️ N clearnet). - Frontend: ComponentHealth panel (components.mjs) + egressRoute() map (logic.mjs) + CSS. - Plumbing: pithead renders P2POOL_CLEARNET; compose passes it + TOR_EGRESS_FIREWALL to the dashboard. - Tests: test_egress.py (8, incl. the host-net-leak nuance) + egressRoute frontend test. Subsumes #295 (Tari status is now surfaced in the panel). Verifiable on an idle stack with no miners (egress posture is live regardless). Closes #170. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Closes #170 (and subsumes #295). A dashboard Component Health panel + header roll-up badge showing, for every stack component, its outbound connections tagged with the network route — the runtime, at-a-glance counterpart to the #160 privacy audit. "Is my stack leaking my home IP?" answered live.
Backend —
service/egress.pyDerives each component's connection routes from live config (never hardcoded), per the #160 lesson (
--onion-addresslooked like Tor but wasn't):p2pool.clearnet, the #270 firewall,xvb.tor/xvb.enabled, monero/tari clearnet-sync, remote-node mode.Models the two backstops honestly:
Roll-up:
🛡️ All egress via Torvs⚠️ N clearnet egress paths.Wiring + frontend
/api/stategains anegresskey + a header summary badge.ComponentHealthpanel (components.mjs) +egressRoute()map (logic.mjs) + CSS.P2POOL_CLEARNET; compose passes it +TOR_EGRESS_FIREWALLto the dashboard so the panel reflects actual config.Tests
test_egress.py(8, incl. the host-net-leak case) + anegressRoutefrontend test. Backend 551 passed / 94%, frontend 34, biome/ruff/yamllint/test-compose clean.Verifiable with no miners
The egress posture is live regardless of mining — ideal to confirm on an idle stack (e.g. pithead-prod while gouda runs the #256 benchmark).
🤖 Generated with Claude Code