Skip to content

SnowWarri0r/lan-transfer

Repository files navigation

LAN Transfer

LAN Transfer

Lightweight cross-platform LAN file transfer & clipboard sync app built with Tauri v2

Stars License Release Rust Tauri Platform

A fast, zero-config file transfer tool for local networks. Select a file, pick a device, and send — no cloud, no account, no internet required.


Features

  • Cross-Platform — Windows, macOS, Linux desktop + Android
  • Auto Discovery — Devices find each other automatically via UDP multicast
  • Real-Time Chat — Text messaging between devices with auto-reconnect
  • Clipboard Sync — Auto-sync clipboard content across devices with history tracking
  • Multi-Language — Built-in i18n support (English & Chinese)
  • Multi-File Transfer — Send multiple files in one batch with queue management
  • Folder Transfer — Send entire folders with directory structure preserved
  • Progress Tracking — Real-time progress bars on both sender and receiver sides
  • Cancellable Transfers — Both sender and receiver can cancel anytime, with cross-device notification and auto-cleanup
  • Drag & Drop — Drag files directly to the app (desktop)
  • Android Multi-Select — Native file picker with multi-select support
  • Android Back Button — Double-press to exit with toast notification
  • No Setup — No server, no registration, just open and go
  • Large File Support — Streaming transfer with backpressure, handles files of any size
  • Android SAF — Full Storage Access Framework support for modern Android scoped storage
  • Lightweight — Small binary, minimal resource usage

How It Works

File Transfer

┌──────────────┐  UDP Multicast   ┌──────────────┐
│   Device A   │◄────────────────►│   Device B   │
│  (Sender)    │                  │  (Receiver)  │
│              │   WebSocket      │              │
│  Select File ├─────────────────►│  Save File   │
└──────────────┘   ws://ip:7878   └──────────────┘
  1. Both devices open the app on the same LAN
  2. Receiver enters Receive Mode, starts listening
  3. Sender enters Send Mode, selects a file
  4. Sender picks a discovered device (or enters IP manually)
  5. File transfers directly over WebSocket

Chat

┌──────────────┐  Bidirectional   ┌──────────────┐
│   Device A   │  WebSocket Chat  │   Device B   │
│              │◄────────────────►│              │
│  Chat Server │   ws://ip:7879   │  Chat Server │
└──────────────┘                  └──────────────┘
  1. Enter Chat Mode on both devices
  2. Pick a device to chat with (or auto-accept incoming connection)
  3. Send messages in real-time with auto-reconnect
  4. Each device runs both server and client for bidirectional communication

Clipboard Sync

┌──────────────┐                  ┌──────────────┐
│   Device A   │  Auto-Sync       │   Device B   │
│              │◄────────────────►│              │
│  Clipboard   │   ws://ip:7880   │  Clipboard   │
└──────────────┘                  └──────────────┘
  1. Enter Clipboard Mode on all devices
  2. Connect to other devices (supports multiple connections)
  3. Enable auto-sync to broadcast clipboard changes automatically
  4. Or use manual sync button to push current clipboard

Screenshots

Select Mode Send Mode Receive Mode Chat Mode
Choose role Pick device & send Wait for files Real-time messaging

Getting Started

Prerequisites

Install & Run

# Clone
git clone https://github.com/SnowWarri0r/lan-transfer.git
cd lan-transfer

# Install dependencies
yarn install

# Run desktop dev
yarn tauri dev

# Run on Android device (USB debugging)
yarn tauri android dev

Build

# Desktop (produces .exe / .dmg / .AppImage)
yarn tauri build

# Android (produces APK + AAB)
yarn tauri android build

Tech Stack

Layer Technology
Frontend React 18 + TypeScript + Tailwind CSS v4
Backend Rust + Tokio async runtime
Framework Tauri v2
Transfer WebSocket (tokio-tungstenite)
Discovery UDP Multicast (socket2)
Android Storage SAF via custom Tauri plugin

Architecture

src/
  App.tsx              # React UI — mode selection, device list, file transfer, chat, clipboard
  i18n/                # Internationalization (English & Chinese)

src-tauri/src/
  lib.rs               # Entry point, plugin & command registration
  android_storage.rs   # Rust ↔ Kotlin plugin bridge for Android SAF
  network/
    transfer.rs        # Discovery, WebSocket server, file I/O
    chat.rs            # Bidirectional WebSocket chat (dual server/client)
    clipboard.rs       # Clipboard sync (multi-device, auto-sync with polling)

src-tauri/gen/android/.../
  app/tauri/storage/
    StoragePlugin.kt   # Android SAF: folder picker, file write via DocumentsContract
  com/tauri_app/app/
    MainActivity.kt    # Multicast lock + back button handling on Android

Network Ports

Port Protocol Purpose
37821 UDP Device discovery (multicast 239.255.77.88)
7878 TCP/WS File transfer
7879 TCP/WS Chat (bidirectional messaging)
7880 TCP/WS Clipboard sync

Contributing

Issues and PRs are welcome! Feel free to open an issue for bug reports or feature requests.

License

MIT © SnowWarri0r


If this project helps you, consider giving it a ⭐

About

A tauri based lan transfer app

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors