LanDrop is a high-performance peer-to-peer (P2P) file sharing tool designed to work over a local network (LAN/Wi-Fi) without needing an internet connection or a central server. Built entirely in Golang, it delivers 100x performance improvements with a modern QUIC-based protocol.
- 100x Performance Boost: Ultra-fast transfers at 22+ MB/s (up from 0.2 MB/s)
- QUIC Protocol: Modern UDP-based protocol with built-in reliability and multiplexing
- Binary Chunk Protocol: Minimal overhead (<0.001%) with 32MB optimal chunk size
- Per-Chunk Integrity: SHA-256 verification for every chunk ensures perfect data integrity
- Smart Resume: Automatic resume from interrupted transfers with chunk-level precision
- Large File Support: Fixed chunk indexing to handle files >4GB and up to petabyte-scale
- Enhanced Security: TLS 1.3 encryption with trust-on-first-use for cross-device transfers
- Beautiful Progress Display: Clean single-line progress with spinning animation and real-time stats
- Professional UX: Color-coded speed indicators, elapsed time, and clean output management
- Serverless P2P Architecture: Every device is both a client and a server
- Device Name Support: Use memorable hostnames like
DESKTOP-JOHNinstead of IP addresses - Automatic Peer Discovery: Devices are discovered automatically with friendly computer names
- Cross-Platform: A single Go codebase compiles to native executables for Windows, macOS, and Linux
- Broadcast Transfers: Send a file to all available peers on the network with a single command (
send <file> all) - Chunked Transfers: Intelligent chunking strategy for optimal performance on large files
- Robust Error Handling: Automatic retries with exponential backoff for network reliability
- Real-time Progress: Beautiful spinning animation progress bar with live speed, chunk count, and elapsed time
LanDrop v2.0 operates on a completely re-engineered decentralized architecture. The system combines modern QUIC protocol for high-performance transfers with UDP-based peer discovery for seamless network integration.
- CLI (Command-Line Interface): Enhanced entry point with support for legacy TCP and new QUIC-based protocols
- Peer Discovery Module (UDP): Non-blocking module that constantly listens for discovery broadcasts and responds with peer information
- QUIC Transfer Module: High-performance protocol with TLS 1.3 encryption, multiplexed streams, and chunk-based transfers
- TCP Transfer Module (Legacy): Backward-compatible protocol for basic file transfers
- Protocol Handler: Intelligent routing between TCP and QUIC protocols based on capabilities
- Broadcast: UDP broadcast containing
"LANDROP_DISCOVERY"message - Response: Direct UDP reply with JSON peer information (hostname, IP:port)
- Collection: 2-second timeout for peer discovery and aggregation
- Handshake: Secure TLS 1.3 handshake with self-signed certificates
- Metadata Exchange: JSON-based transfer request with file metadata
- Chunked Transfer: 32MB chunks with per-chunk SHA-256 verification
- Stream Multiplexing: Multiple concurrent QUIC streams per transfer
- Binary Protocol: 40-byte headers for minimal overhead
- Backward Compatibility: Original single-stream TCP protocol
- Resume Support: Basic file-level resume capability
- Integrity Verification: SHA-256 checksums for complete files
| Metric | Version 1.0 | Version 2.0 | Improvement |
|---|---|---|---|
| Transfer Speed | 0.2 MB/s | 22+ MB/s | 100x |
| Large File Support | β Failed | β Perfect (>4GB to Petabytes) | 100% |
| Protocol Overhead | 50% | <0.001% | 99.9% reduction |
| Chunk Count | 1024 (1MB) | 32 (32MB) | 32x reduction |
| Transfer Time (1GB) | 15+ minutes | 46 seconds | 20x faster |
| Reliability | β Corrupted | β Perfect | 100% success rate |
| Progress Display | β Verbose | β Beautiful Spinning | 100% improved |
| User Experience | β Poor Feedback | β Professional | 100% enhanced |
# Start high-performance receiver
landrop recv-chunked
# Send file using optimized chunked protocol with device name
landrop send-chunked <filename> <device-hostname>
# Send file using optimized chunked protocol with IP address
landrop send-chunked <filename> <peer-address>
# Send to all discovered peers
landrop send-chunked <filename> all
# Test QUIC connectivity
landrop test-quic-recv [port]
landrop test-quic-send <peer-address># Discover peers
landrop discover
# Send file to specific peer
landrop send <filename> <hostname>
# Send to all peers
landrop send <filename> all
# Start receiver
landrop recv [port]- No installation required if you are using a pre-compiled executable from the Releases section.
- To build from source, you need the Go compiler (v1.18 or higher).
- Start the receiver on one machine:
# High-performance QUIC receiver (recommended)
landrop recv-chunked
# Or legacy TCP receiver
landrop recv- Discover peers on the sender machine:
landrop discover- Send files using the new chunked protocol:
# Send to a specific peer using device name (recommended)
landrop send-chunked <filename> <device-hostname>
# Send to a specific peer using IP address
landrop send-chunked <filename> <peer-address>
# Send to all discovered peers
landrop send-chunked <filename> all- Same Network: Both devices must be on the same LAN/Wi-Fi network
- Firewall: Ensure ports 8080 (TCP/UDP) and 8888 (UDP) are not blocked
- Discovery: UDP broadcasts must be allowed on the network
Version 2.0 now supports human-readable device names for both protocols:
# Discover available devices with friendly names
landrop discover
# Output: GOUTHAM-808 (192.168.1.10:8080), LAPTOP-ALICE (192.168.1.15:8080)
# Send using memorable device names (no IP addresses needed!)
landrop send-chunked report.pdf GOUTHAM-808
landrop send video.mp4 LAPTOP-ALICE
# Legacy protocol also supports device names
landrop send document.docx allBenefits:
- No More IP Memorization: Use device names like
DESKTOP-JOHNinstead of192.168.1.10:8080 - Enhanced UX: Friendly, human-readable interface for all transfers
- Automatic Discovery: Devices appear with their computer names automatically
- Broadcast Support: Send to all peers with a simple
allcommand
If LanDrop works on the same computer but not between different computers:
-
Check Firewall Settings:
- Windows: Allow
landrop.exethrough Windows Firewall - Add exceptions for ports 8080 and 8888
- Windows: Allow
-
Verify Network Connectivity:
# Test direct connection landrop test-quic-send <peer_ip>:8080 landrop test-quic-recv 8080
-
Check Network Topology:
- Ensure both computers are on the same subnet
- Run
ipconfig(Windows) orifconfig(macOS/Linux) to verify similar IP ranges
- Download the correct executable for your operating system:
landrop.exefor Windowslandrop-linuxfor Linuxlandrop-mac-arm/landrop-mac-intelfor macOS
- Save the executable in a convenient location (e.g.,
Downloadsfolder). - Open a terminal application:
- Windows: PowerShell or Command Prompt
- macOS/Linux: Terminal
- Navigate to the directory where you saved the executable:
cd DownloadsAll commands are run from the terminal.
It is recommended to receive files in a dedicated downloads folder.
Windows (PowerShell):
# 1. Create a new folder for downloads and enter it
mkdir landrop_downloads
cd landrop_downloads
# 2. Start the receiver
..\landrop.exe recvmacOS / Linux (Terminal):
# 1. Create a new folder for downloads and enter it
mkdir -p landrop_downloads
cd landrop_downloads
# 2. Start the receiver
../landrop recvYour machine is now discoverable and ready for incoming files.
Step 1: Discover who is on the network
Windows (PowerShell):
.\landrop.exe discovermacOS / Linux (Terminal):
./landrop discoverExample output:
DESKTOP-JOHN (192.168.1.10:8080)
Step 2: Send the file
Make sure your terminal is in the same directory as the file you want to send.
Windows (PowerShell):
# Send a file to a specific peer
.\landrop.exe send "My Project.zip" DESKTOP-JOHN
# Send a file to EVERYONE on the network
.\landrop.exe send "My Project.zip" allmacOS / Linux (Terminal):
# Send a file to a specific peer
./landrop send "My Project.zip" DESKTOP-JOHN
# Send a file to EVERYONE on the network
./landrop send "My Project.zip" allYou can compile executables for all major platforms from a single machine. Run these commands from the project root.
# For Windows (64-bit)
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o ./builds/landrop.exe .
# For Linux (64-bit)
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o ./builds/landrop-linux .
# For macOS (Apple Silicon)
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o ./builds/landrop-mac-arm .
# For macOS (Intel)
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o ./builds/landrop-mac-intel .The compiled binaries will be placed in the builds directory.
landrop/
βββ go.mod
βββ go.sum
βββ main.go # Enhanced CLI handler with protocol routing
βββ p2p/
βββ constants.go # Network and protocol constants
βββ discovery.go # UDP broadcast and discovery logic
βββ protocol.go # Message serialization and protocol definitions
βββ tcp_transfer.go # Legacy TCP file transfer protocol
βββ quic_transfer.go # High-performance QUIC file transfer
βββ chunked_transfer.go # Chunked transfer implementation
βββ tls_config.go # TLS configuration for QUIC
βββ errors.go # Error handling utilities
βββ buffer_pool.go # Memory pool management
βββ transfer_stats.go # Transfer statistics tracking
- QUIC protocol foundation with TLS 1.3
- Binary chunk protocol with minimal overhead
- Optimized 32MB chunking strategy
- Application-level reliability with per-chunk verification
- Enhanced security model with built-in encryption
- TLS certificate verification fix for cross-device transfers
- Trust-on-first-use approach for LanDrop devices
- Cross-device compatibility without hardcoded IP limitations
- Proper certificate management for local networks
- Compact single-line progress display with spinning animation
- Real-time transfer statistics (speed, time, chunk count)
- Color-coded progress indicators
- Clean output management and professional summaries
- Enhanced CLI with beautiful UX
- Multi-file and directory transfers with manifests
- Transfer history and analytics with SQLite storage
- Multi-recipient broadcast with session management
- Progressive Web App (PWA) interface with drag-and-drop
- Zero-configuration setup and automatic peer pairing
- Network: 1Gbps LAN
- File Size: 1GB binary file
- Hardware: Modern desktop computers
| Protocol | Transfer Speed | CPU Usage | Memory Usage | Reliability |
|---|---|---|---|---|
| Legacy TCP | 0.2 MB/s | 5% | 50MB | β Corrupted files |
| QUIC v2.0 | 22+ MB/s | 15% | 100MB | β Perfect integrity |
| Chunk Size | Chunk Count | Transfer Speed | Efficiency |
|---|---|---|---|
| 1MB | 1024 | 0.2 MB/s | β Poor |
| 8MB | 128 | 0.9 MB/s | β Slow |
| 32MB | 32 | 22 MB/s | β Optimal |
// 44-byte header for maximum efficiency (updated for large file support)
type ChunkHeader struct {
ChunkIndex [8]byte // uint64 - supports petabyte-scale files
DataSize [4]byte // uint32
Checksum [32]byte // SHA-256
}The protocol now handles files of any size through:
- 64-bit Chunk Indexing: Expanded from 32-bit to 64-bit chunk indices
- Petabyte Scale: Supports files up to 18 exabytes with 32MB chunks
- Overflow Prevention: Fixed integer overflow issues that caused errors with files >4GB
- Backward Compatibility: Protocol changes are transparent to end users
- Buffer Pool Management: Reuse memory buffers to reduce GC pressure
- Stream Multiplexing: Parallel QUIC streams for concurrent chunks
- Zero-Copy Operations: Minimize memory allocations during transfers
- Adaptive Chunking: Dynamic chunk sizing based on network conditions
- TLS 1.3: Modern encryption with perfect forward secrecy
- Trust-on-First-Use: Cross-device compatibility with proper certificate management
- Per-Chunk Integrity: SHA-256 verification for every data chunk
- Stream Isolation: Independent security contexts per transfer
Version 2.0 features a stunning single-line progress interface:
# Live example during transfer
[******|.....] SEND 60.0% | 6/10 | π 3.2MB/s | β±οΈ 00:08Features:
- Spinning Animation: Smooth
|/-\-animation for current chunk - Visual Indicators:
*for completed,.for pending chunks - Real-Time Statistics: Live speed (MB/s), elapsed time, and progress percentage
- Color Coding: Speed-based colors (green/yellow/cyan) for quick performance glance
- Clean Output: Professional single-line display with proper line clearing
- Professional Summaries: Beautiful completion reports with comprehensive transfer statistics
We welcome contributions! Key areas for improvement:
- Protocol Optimization: Enhance the binary protocol for even better performance
- Cross-Platform Testing: Ensure reliability across different operating systems
- Network Compatibility: Improve discovery on complex network topologies
- Security Enhancements: Implement advanced authentication mechanisms
# Clone the repository
git clone https://github.com/goutham80808/LanDrop.git
cd landrop
# Install dependencies
go mod tidy
# Run tests
go test ./p2p/...
# Build for your platform
go build -o landrop .