Skip to content

tuxnode/LanSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LanSync

A lightweight LAN file synchronization tool written in Go, with HTTP API and optional Qt desktop client.

Features

  • Daemon-based architecture with HTTP API for management
  • TCP-based peer-to-peer file synchronization
  • SHA-256 file indexing for integrity verification
  • Real-time file watching via inotify/kqueue
  • Automatic LAN peer discovery
  • Manual peer connection support
  • Cross-platform (macOS, Linux, Windows)

Usage

lansync daemon   [--dir PATH] [--port PORT] [--peer ADDR]  Start daemon
lansync connect  <address:port>                             Connect to a peer
lansync status   [--http PORT]                              Show daemon status
lansync peers    [--http PORT]                              List connected peers
lansync log      [--http PORT]                              View event log

Build

git clone https://github.com/tuxnode/LanSync.git
cd LanSync && go build ./cmd/...

Cross-Platform Build

# macOS / Linux
go build -o lansync ./cmd/lansync/

# Windows (cross-compile from macOS/Linux)
GOOS=windows GOARCH=amd64 go build -o lansync.exe ./cmd/lansync/

Build the GUI

sudo apt install libxxf86vm-dev libxrandr-dev libxi-dev libxcursor-dev libxinerama-dev
go build ./cmd/lansync-gui/...

Qt Desktop Client

A Qt Widgets desktop client is available under clients/qt-lansync. It uses the same JSON SyncMessage protocol as the Go daemon and supports TCP sync, SHA-256 file indexing, file watching, manual peer connection, and LAN discovery.

Build with Qt 6 or Qt 5.15:

cmake -S clients/qt-lansync -B clients/qt-lansync/build
cmake --build clients/qt-lansync/build

Tests

go test -v ./internal/...

License

MIT

About

Golang Local Lan Sync

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors