Skip to content

Fast, secure, cross-platform LAN file sharing app with end-to-end encryption built using Electron and Vue.js.

License

Notifications You must be signed in to change notification settings

majdev25/FileTransfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileTransfer Logo

FileTransfer — Simple Cross-Platform LAN File Sharing App

Fast, secure, and private file transfer — right from your desktop.

Electron Built with Vue License: MIT PRs Welcome

A fast, minimal, and secure file transfer desktop app built with Electron. Send and receive files between devices over local networks with ease.


⬇️ Download

Get the latest release of FileTransfer for your OS:


📝 Motivation

In my work environment, sharing files was often slow and cumbersome — USB drives, email attachments and shared folders were inefficient, especially across different operating systems.

I wanted a fast, private, and simple way to share files with just one person, even over potentially unsecure networks.

This frustration inspired FileTransfer, a lightweight app for secure peer-to-peer file transfer on local networks.

📖 Table of Contents


✨ Features

  • Fast Transfer – optimized peer-to-peer data exchange
  • 🔐 Secure – RSA encrypted connections between devices
  • 🖥️ Cross-platform – works on Windows, macOS, and Linux
  • 📁 Drag & Drop Support – just drag files to send
  • 🌐 LAN Discovery – simply add friends on LAN

🧩 Screenshots

Add Friend Friend List Accept File
Add Friend Friend List Accept File

🧠 Tech Stack

  • Electron — cross-platform desktop framework
  • Vue.js — modern reactive UI

🔐 Security Overview

FileTransfer ensures that all data is transmitted securely between devices using a hybrid encryption scheme.

Key Features

  • Asymmetric Encryption (Public Key Cryptography) Each device generates a public/private key pair. The public key is shared with other devices, while the private key never leaves the local machine.

  • Key Encryption Key (KEK) A KEK is used to encrypt the actual session key exchanged between peers.

  • Session Keys For each transfer, a unique symmetric key is generated to encrypt the file data itself. After the transfer is complete, the session key is destroyed.

  • End-to-End Encryption Only the sender and receiver can decrypt the transmitted file — no third party or relay server can read the data.


🤝 Contributing

Contributions, bug reports, and suggestions are welcome! If you'd like to add features or fix issues, please open a Pull Request.

git checkout -b feature/your-feature
git commit -m "Add: new feature"
git push origin feature/your-feature

📘 Documentation

🧭 Project Structure & Entry Points

File / Directory Description
electron/main.js Main Electron entry point — creates the app window and initializes communication and dependencies.
electron/preload/preload.js Exposes secure APIs to the renderer (Vue).
electron/preload/passwordPreload.js Preload for the password entry window.
electron/main/ipcs/index.js Centralized IPC handlers for communication between main and renderer processes.
vue/main.js Entry point for the Vue UI.

🔌 IPCs (Inter-Process Communication)

All Electron IPC communication is centralized in electron/ipcs/index.js.
It contains the main channels for sending and receiving messages between the main process and Vue renderer processes, including:

  • File transfer commands
  • Encryption key exchange
  • Status updates for UI
  • Password validation events

Files are inside electron/main/ipcs/

File / Directory Description
electron/addFriend.js Handles friend discovery and peer connection setup.
electron/fileTransfer.js Manages file transfer requests and progress updates.
electron/app.js Handles general app operations (copy/paste, file selection, etc.).

🗂️ Backend Modules

File / Directory Description
electron/cryptoUtils.js Provides cryptographic utilities including RSA encryption/decryption, AES encryption/decryption with HMAC, and object/buffer conversions.
electron/friendsManager.js Manages friends list: adding/removing friends, storing metadata, handling AES handshake state, and persisting encrypted friend data to disk.
electron/keyManager.js Handles RSA key pair generation, passphrase validation, symmetric key generation, and key encryption/decryption utilities.
electron/settingsManager.js Manages user settings (like download path) with AES-encrypted persistence and simple getters/setters.
electron/tcpServer.js Implements TCP servers for RSA and AES encrypted communication with friends, including session management, handshake, and JSON stream handling.
electron/udpServer.js Provides an event-driven UDP server for sending and receiving JSON messages, with automatic event emission based on message type. (Friend discovery)

Class instances are intentionally omitted for clarity. This diagram focuses on the static structure of modules and their dependencies.

Development running

🛠️ Installation

git clone https://github.com/maj-devs/fileTransfer.git
cd fileTransfer
npm install
cd vue
npm install

Running 2 Instances on Localhost (for testing)

Instance A:

TCP_PORT=41237 UDP_PORT=41200 UDP_PORT2=41202 INSTANCE=1 npm run dev

Instance B:

TCP_PORT=41235 UDP_PORT2=41200 UDP_PORT=41202 INSTANCE=2 npm run dev

Building app

npm run build

Protocols

UDP Friend Discovery

KEK AES Key Exchange

About

Fast, secure, cross-platform LAN file sharing app with end-to-end encryption built using Electron and Vue.js.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •