Ivan 8125001a49 Improve logging and file synchronization handling in RNS FileSync
- Updated logging messages to include browser mode information when sending and receiving file lists.
- Added warnings for cases where the sync directory is not set.
- Improved file request and sync logging to provide clearer insights into the synchronization process.
- Implemented checks for incomplete file downloads, including size mismatches and chunk counts, with appropriate logging for errors and warnings.
2025-11-22 13:12:18 -06:00
2025-11-22 12:45:16 -06:00

RNS FileSync

P2P file synchronization with delta sync over Reticulum. Only changed blocks are transmitted making it bandwidth efficient.

Installation

pip install rns --break-system-packages
# or 
pipx install rns
git clone https://github.com/Sudo-Ivan/RNS-Filesync.git
cd RNS-Filesync

Usage

Start syncing:

python rns_filesync.py -d ~/shared # or whatever directory you want to sync

Connect to peer:

python rns_filesync.py -d ~/shared -p <peer_destination_hash>

Options

-d PATH              Directory to sync (required)
-i NAME              Identity name
-p HASH              Peer to connect (multiple allowed)
-n                   No monitoring (one-time sync)
--permissions-file   Permissions file path
--allow HASH         Allow peer
--perms LIST         Permissions (read,write,delete)
--no-tui             Disable TUI
-v, -vv, -vvv        Verbosity

Commands

status           Show file and peer count
peers            List peers
connect <hash>   Connect to peer
browse <peer>    Browse peer files
download <file>  Download file
download_all     Download all from peer
logs             View logs
quit             Exit

Permissions

Create permissions.conf:

# Full access
a1b2c3d4e5f6g7h8 read,write,delete

# Read-only
9876543210fedcba read

# Public read
* read

Use:

python rns_filesync.py -d ~/shared --permissions-file permissions.conf

How It Works

  • Files divided into 4KB blocks, each hashed
  • Only changed blocks transmitted (delta sync)
  • SHA-256 ensures integrity
  • Scans directory every 5 seconds
  • Mesh distribution (peers relay files)
  • Last write wins (no conflict resolution)
Description
P2P File Synchronization Tool for Reticulum
Readme 74 KiB
Languages
Python 100%