Repository navigation
2.1.0: local API (phase 1) and the input box's status through the diode - #6
Merged
Merged
Conversation
- status channel: the input box sends its status every lidi.heartbeat on the lidi endpoint after the last module, signed; the output box keeps it and warns when it goes silent or the transport hash differs - stats registry fed by transfer.jsonl events and the supervisor; status files in /run/dyode and 'dyode status [--json]' - API (feature api, default): /v1/health, /v1/status, /metrics, /v1/check, /v1/openapi.json over rustls TLS with per-box bearer tokens; refuses the diode NIC; 'dyode api-token', 'dyode api-cert' - guided setup: Local API screen (address, certificate, first token) - install.sh: openssl when missing; nftables drops the API port on the diode NIC; units get RuntimeDirectory=dyode - docs/API.md and docs/api/openapi.yaml (a test keeps the routes in step) - tests: status through real lidi + forged status refused + API over TLS Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QXjQsiWnwLMndr5XU9g5LJ
This was referenced Oct 28, 2026
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.
Phase 1 of the API plan: each box serves its own status, read-only, and the output box serves the input box's too, from a status message that crosses the diode like everything else.
Status through the diode
lidi.heartbeats the input box sends its status (modules, restarts, transfer.jsonl event counts, bytes, free space, static ARP entry, transport hash) on the lidi endpoint after the last module, signed withdyode.key. A forged status is refused (tested).Event::emit(before the per-file switch) and the supervisor; no module code changed./run/dyode/status-<side>.json;dyode status [--json]prints it (no API needed). Units getRuntimeDirectory=dyode.The API (cargo feature
api, on by default)GET /v1/health,/v1/openapi.json(no token);/v1/status,/metrics(Prometheus),/v1/check(token withread).max_clients, one request per connection.api: {in: {...}, out: {...}}, each box uses its own side. Refused:0.0.0.0, the box's diode address, and (at start) any address on the diode NIC;tls: offonly on loopback.dyode api-token add|list|revoke(SHA-256 hashes, file per box, mode 600);dyode api-cert(self-signed P-256 via openssl, end-entity, prints the fingerprint).api_refusedevents and counters.docs/API.md,docs/api/openapi.yaml(served built-in; a test keeps it equal to the routes).Setup and install
Compatibility
Both boxes need 2.1.0 (one more lidi endpoint).
max_clientsdefault +1;dyode checkwarns about an explicit value that is too low.Testing
dyode out+dyode inprocesses over loopback with both APIs: files crossed, both boxes in/metrics,dyode statusshows both, killing the input box raised the silence warning after ~3 heartbeats.-D warningswith and without theapifeature.Monitoring for this (rules, dashboard, Zabbix 7 template): nc-intezra/dyode_monitoring#1.
Generated by Claude Code