Skip to main content

P2P File Share

Share files directly between peers without central servers. Built with Node.js and inspired by BitTorrent protocol.

Key Features

Pure P2P Architecture

No trackers or central servers required. Peers connect directly to each other in a decentralized mesh network.

Peer Exchange

Dynamic peer discovery through PEX protocol. Peers share information about other peers automatically.

File Fragmentation

Files are split into 64 KiB pieces for efficient parallel downloading and sharing across the network.

Progress Tracking

Real-time progress display with download speed, percentage complete, and bytes transferred.

Hash Verification

SHA-1 hash verification ensures file integrity after download completes.

Cross-Platform

Works on Linux, Windows, and macOS with Node.js v22 or higher.

Quick Example

Start a seed node to share a file:
npm start -- --port 6881 --file "/path/to/file.mp4"
Download the file from another machine:
npm start -- --port 6882 --file "/path/to/output.mp4" --peer 192.168.1.100:6881

Getting Started

Installation

Install Node.js v22+ and clone the repository

Quickstart

Get up and running in 5 minutes

Architecture

Learn how the P2P system works

Protocol Reference

Understand the messaging protocol

Build docs developers (and LLMs) love