Case Study
NearSend File Share
Ultra-fast local file sharing without the cloud. Transfer gigabytes in seconds using direct device-to-device connections.
The Challenge
Understanding the Problem
Our Approach
The Solution
High-speed UDP discovery protocol with TCP for reliable multi-gigabit streams. Near-instant device discovery on both 2.4GHz and 5GHz WiFi bands.
- 450Mbps+ Transfer Speed
- <1s Discovery Time
- AES-256 Encryption
The Outcome
Achieved stable 450Mbps+ transfer speeds on WiFi 6, making NearSend faster than most cloud-based alternatives while keeping all data local.
Impact: 450Mbps+ Transfer Speed
Technical Deep Dive
Engineering Excellence
A comprehensive look at the technical architecture and implementation details that power this solution.
discovery
Utilizes mDNS (Multicast DNS) and custom UDP broadcast packets for near-instant device discovery on 2.4/5GHz bands with zero configuration.
performance
Stable 450Mbps+ speeds on Wi-Fi 6 with zero packet loss buffer management. Optimized memory usage for transferring files larger than available RAM.
encryption
AES-256-GCM encryption with ephemeral key exchange and forward secrecy. All transfers are encrypted by default with no performance penalty.
System Architecture
Sender Device
Flutter Client
mDNS/UDP Discovery
Device Broadcast
Key Exchange
ECDH Ephemeral Keys
TCP Stream
Rust Transfer Engine
Receiver Device
Decryption + Save
Development Journey
From Concept to Launch
Protocol Research
Analyzed LocalSend, AirDrop, and Nearby Share protocols to identify weaknesses, designed custom hybrid discovery using mDNS + UDP broadcast for maximum compatibility, and established security requirements for E2EE file transfers.
Rust Core Engine
Built high-performance transfer engine in Rust with zero-copy optimizations, implemented custom TCP streaming protocol with pipelining for maximum throughput, and developed memory-efficient chunking for files larger than RAM.
Cross-Platform Clients
Created unified Flutter UI for Android, iOS, Windows, macOS, and Linux, implemented native platform bridges (FFI) to Rust core for performance, and built responsive adapters for desktop, tablet, and phone form factors.
Security Hardening
Integrated AES-256-GCM encryption with ephemeral ECDH key exchange, implemented certificate pinning and forward secrecy guarantees, and conducted third-party security audit with penetration testing.
Beta Testing
Launched community beta program with 5000+ testers across platforms, optimized transfer speeds based on real-world network conditions, and fixed edge cases in NAT traversal and firewall configurations.
Measurable Impact
Key Results
Direct business value delivered.
Impact Analysis
Discovery Time
Before
5-10s
After
<1s
Transfer Speed
Before
50Mbps
After
450Mbps
Connection Success
Before
70%
After
98%
Technology Stack
Tools & Frameworks
Implementation
UDP Device Discovery
Hybrid mDNS + UDP broadcast for instant device discovery on local networks.
1use std::net::UdpSocket;23fn discover_devices() -> Vec<Device> {4 let socket = UdpSocket::bind("0.0.0.0:54321")?;5 socket.set_broadcast(true)?;6 7 // Send broadcast packet8 let message = b"NEARSEND_DISCOVER";9 socket.send_to(message, "255.255.255.255:54321")?;10 11 // Listen for responses12 let mut devices = Vec::new();13 socket.set_read_timeout(Some(Duration::from_secs(2)))?;14 15 loop {16 let mut buf = [0u8; 1024];17 match socket.recv_from(&mut buf) {18 Ok((size, addr)) => {19 if let Ok(response) = parse_response(&buf[..size]) {20 devices.push(Device {21 name: response.name,22 ip: addr.ip(),23 platform: response.platform,24 });25 }26 }27 Err(_) => break, // Timeout28 }29 }30 31 devices32}Performance
Performance Audits
"Finally, file sharing that just works. No accounts, no cloud, no waiting."
