Skip to content
Daniel Brown edited this page Sep 10, 2026 · 4 revisions

DragonSniff

DragonSniff is local, read-only validation and observability tooling for Dragon-family devices. A Dragon-family DUT remains its primary target; optional PrusaLink polling supplies auxiliary correlated evidence. DragonSniff records evidence without becoming part of a device's control or safety boundary.

The dragon remains responsible for being a dragon.

Start here

User interface

The Dragon-family interface separates each kind of work:

Surface Purpose
Dashboard Connect to an authorized Dragon device and see the current session
Thermal Capture Run bounded passive temperature, PID-output, and health sampling
Churn Stress Exercise sequential SSE connect/observe/disconnect lifecycles
History Review persistent sessions and download their retained evidence
Evidence Inspect raw and parsed endpoint, event, source-observation, and run records
Laboratory Address-only display options at /lab; deliberately absent from navigation

The laboratory is hidden for discoverability, not security. It adds no device mutation or control capability.

Operating modes

DragonSniff permits only one active operating mode at a time:

  1. Normal observation — fixed read-only Dragon endpoints plus one Dragon SSE stream, with optional PrusaLink status observations.
  2. Bounded churn — sequential SSE lifecycle exercise with health and cleanup evidence.
  3. Passive thermal capture — scheduled Dragon state/health and optional PrusaLink status sampling for a finite duration.

Every mode uses fixed API paths and bounded inputs. Dragon work uses serialized local application actions and a two-connection Dragon-device budget.

The optional PrusaLink source is disabled by default and pauses during Churn. It makes only authenticated GET /api/v1/status requests; it adds no printer controls and does not reconstruct Jump Jet policy.

Dragon-family firmware and DragonSniff use PrusaLink for different purposes:

  • Product path: PrusaLink → dragon-core dc_prusa → Dragon-family firmware and product-local logic.
  • Validation paths: PrusaLink → DragonSniff read-only auxiliary observation, while Dragon-family DUT telemetry → DragonSniff; both are correlated on the evidence timeline.

dc_prusa remains the reusable firmware-side PrusaLink client used by products such as JumpJet. DragonSniff's independent poll does not replace it or participate in product policy. The independent view lets validation compare what the printer reported with what the DUT reported or did, without relying solely on the DUT's interpretation. DragonSniff remains a Dragon-family validation and observability tool, not a generic printer-management tool.

Evidence model

Raw Dragon payloads are first-class evidence. Parsed views never replace or discard the exact Dragon response text. JSONL exports preserve lifecycle records in arrival order, including:

  • request and response identity
  • timestamps and elapsed time
  • HTTP status and raw body
  • parsed JSON when valid
  • SSE events, comments, disconnects, and failures
  • boot-ID observations
  • optional heap, Wi-Fi, and SSE-client diagnostics
  • optional PrusaLink source_observation records
  • cancellation, settlement, and cleanup outcomes

All record kinds share one recorder and one global sequence, which is the authoritative cross-source arrival order. PrusaLink observed_at and recorder timestamp values are assigned by DragonSniff because /api/v1/status provides no printer timestamp. Last-known-good printer data may remain visible while freshness becomes stale; a failed required-core sample does not refresh it. Missing optional fields remain missing. DragonSniff does not invent values, diagnose a reboot from a boot-ID change alone, or convert product-specific behavior into a universal Dragon contract.

A healthy PrusaLink sample requires printer.state, printer.temp_bed, and printer.target_bed. Nozzle actual/target fields are best-effort and malformed optional values are omitted and identified. PrusaLink records retain only the admitted normalized fields, not the response body. The shared in-memory recorder remains one FIFO: its additional source allowance approximately preserves the prior live-history horizon, but does not guarantee ownership of 2,000 slots by Dragon records. Thermal source allowance is capped; persistent JSONL remains append-only.

Safety and network boundary

  • The service binds to loopback by default.
  • A trusted-LAN deployment must explicitly name each accepted browser authority.
  • The browser communicates with the local DragonSniff service, not directly with the device.
  • Device access is limited to fixed read-only endpoints.
  • Optional printer access is limited to authenticated GET /api/v1/status.
  • DragonSniff is not a generic proxy.
  • It does not issue heater, fan, motion, configuration, token, OTA, restart, or reset commands.
  • Host/Origin validation is a backstop, not authentication. Never expose the service to the public internet or an untrusted network.
  • It is intended only for devices and trusted development networks you are authorized to inspect.

Current deployment status

DragonSniff supports both loopback-only local operation and a direct trusted-LAN Portainer deployment using exact configured browser authorities. The direct topology has passed a real NAS smoke test, and the former Caddy header-rewrite workaround has been retired. Persistent evidence survives browser closure and container replacement. Startup records unfinished runs as interrupted without resuming device work.

The Dashboard reports No current evidence until the authoritative current recorder contains records; prior persistent sessions remain available through History. Optional PrusaLink status shows printer state, bed actual/target, freshness, and source lifecycle without adding controls. polling reports active versus inactive polling; source_state explains why the source is disabled, paused, stale, failed, or otherwise inactive. The source is disabled unless DRAGONSNIFF_PRUSALINK_URL and an API key are configured; prefer DRAGONSNIFF_PRUSALINK_API_KEY_FILE, with an optional DRAGONSNIFF_PRUSALINK_POLL_INTERVAL. PrusaLink authentication protects only that outbound printer request; it does not authenticate DragonSniff. A browser tab can briefly report a fetch failure while its container is intentionally stopped, then recover after the service returns.

The public GHCR image is currently Linux/amd64 and is published as latest plus immutable full-SHA tags. Direct LAN HTTP works, but HTTPS deployment and the Brave JSONL-download warning remain open work; trusted-host configuration is not authentication.

Canonical technical documentation

The repository remains authoritative for versioned technical detail:

PrusaLink observation is implemented. Other external sources—thermocouple loggers, PSU/current monitors, bench instruments, and similar equipment—remain future work. DragonSniff does not yet provide a generic source-plugin framework.