Skip to main content

Crate bairelay_wake_server

Crate bairelay_wake_server 

Source
Expand description

Local replacement for Reolink’s P2P cloud servers — wakes battery cameras over the LAN.

Wire-level reverse-engineering and operator-facing details live in docs/cloud-interception.md § Part I.

Re-exports§

pub use config::WakeServerConfig;

Modules§

config
Operator-facing configuration for the wake server.
packet
Thin helpers wrapping bairelay_neolink_core::bcudp framing for the wake server.
registry
In-memory UID → address registry populated by D2R_HB heartbeats, plus a per-UID session-state map populated by M2D_Q_R issuance.
route
Resolve which local IP to advertise to a remote peer.

Enums§

WakeServerError
Public error type at the library boundary.

Functions§

make_registry
Build a fresh Arc<CameraRegistry> for the binary to share between the wake server and downstream consumers. Tests can call this too — keeps registry construction in one place.
run
Production entrypoint: binds the configured sockets and runs the listener pair until the cancellation token fires. The caller supplies the Arc<CameraRegistry> so it can be shared with the push-listener and any future readers.
run_with_sockets
Internal entrypoint used by both production run and integration tests. Tests bind sockets to ephemeral ports first; production binds based on RuntimeConfig. Returns Ok(()) on graceful cancellation.