lanflare-core
High-performance, async engine for local peer discovery, ephemeral mTLS identity generation, streaming I/O, and file transfer orchestration. Powering LanFlare and fully interoperable with official LocalSend v2.2 clients.
Key Subsystems
- Hybrid Discovery Engine:
- UDP Multicast (
224.0.0.167:53317) announcement and listener. - Modern mDNS (DNS-SD) service advertiser and browser (
_lanflare._tcp.local.). - Active
/24subnet scanning fallback for restrictive networks and Android AP isolation. - Unified
PeerRegistrywith deduplication, address aggregation, and automatic stale eviction.
- UDP Multicast (
- Security & Ephemeral Crypto:
- Fast on-the-fly Ed25519 / RSA self-signed X.509 certificate generation via
rcgen. - Trust-On-First-Use (TOFU) and pinned SHA-256 certificate fingerprint verification.
- Hyper v1 HTTP/HTTPS mTLS server and client orchestrators.
- Fast on-the-fly Ed25519 / RSA self-signed X.509 certificate generation via
- Streaming Storage Engine:
- Direct socket-to-disk buffered pipeline (128 KB buffer profile) with >2.2 Gbps throughput.
- Concurrent on-the-fly SHA-256 computation during streaming.
- Atomic rename (
.{filename}.{uuid}.lanflare-part) preventing incomplete or corrupt files. - Robust security: path traversal sanitization, reserved name neutralization, and disk bombing limits.
Usage
Add this to your Cargo.toml:
[]
= "0.2.0"
License
Licensed under the Apache License, Version 2.0 (LICENSE or http://www.apache.org/licenses/LICENSE-2.0).