Peer discovery
UDP multicast announcements, HTTP probing, loopback smoke tests, and IPv4 CIDR scanning for practical LAN discovery.
Debuff gives Android, Linux, Windows, and macOS apps the same LAN foundation: peer discovery, trusted pairing, JSON messages, and byte streams. It stays local by default and keeps the UI boundary small.
Debuff focuses on the pieces every local client keeps needing: find peers, identify them, decide who is trusted, and move data with bounded failures.
UDP multicast announcements, HTTP probing, loopback smoke tests, and IPv4 CIDR scanning for practical LAN discovery.
Each node keeps an Ed25519-backed identity and fingerprint, so apps can separate first-seen peers from trusted devices.
Short-lived PIN pairing, manual accept or reject events, trusted-only mode, blocked peers, and nonce replay rejection.
HTTP JSON messages carry topics and app payloads through a simple protocol that desktop and mobile UIs can inspect.
Raw byte streams and chunked transfer support payload hashes, receiver progress events, and sender-side cancellation.
A C ABI returns UTF-8 JSON strings, so Flutter, Dart, and future app shells can share the same Rust runtime contract.
The runtime is designed so product teams can wire clear UI states around the network lifecycle.
Choose an alias, port, state path, and trust policy. Debuff starts HTTP service and discovery listeners.
Broadcast on the local network, respond to announcements, or scan a known subnet when multicast is filtered.
Pair with a code or let the UI confirm an inbound request before a peer becomes trusted.
Send JSON messages or binary streams with topic routing, signatures, timeouts, and size guardrails.
The current implementation ships a CLI for smoke tests and a C ABI that higher-level apps can load dynamically on each supported platform.
# Run a local node
cargo run -- serve --alias alpha --port 47791
# Scan a LAN subnet
cargo run -- scan-subnet --subnet 192.168.1.0/24
# Package the FFI library
scripts/package_ffi.sh --sync-dart
Debuff is being exercised by five LAN game apps that need the same room, invitation, game-event, and snapshot-sync behavior across phone, desktop, and tablet.
The first app on Debuff is a Flutter Chinese chess client. One host validates room events, guests join over the local network, and spectators can follow synchronized snapshots.
The second app reuses the proven LAN pattern for two-player dark-chess Junqi, with red and blue armies, hidden opponent pieces, setup submission, battle disclosure, and synchronized endings.
The third app uses the same host-authoritative room flow for casual 15 x 15 Gomoku, with local self-play, room play, spectators, and phone-friendly board sizing.
The fourth app proves Debuff with an 8 x 8 Reversi rules engine, legal-move highlighting, flip animations, pass handling, and synchronized end scoring.
The fifth app extends the same LAN pattern into a two-player teaching Majiang client with local player-vs-computer play, room play, spectators, tile assets, and GB81 scoring.
No cloud signaling is required for the current scope. Debuff is optimized for private networks where different device types can see each other directly.
The project is early, practical, and built around real multi-endpoint LAN product needs: identity, discovery, trust, messages, and streams.