Skip to content

Repository files navigation

BitForge - A Basic Torrent-like Client

BitForge is a custom-built torrent-like peer-to-peer (P2P) file sharing client designed from scratch in Python. It supports downloading files in parallel from multiple peers, seeding, and a GUI interface using PyQt5.

๐Ÿ’ก Inspiration

BitForge was inspired by the inner workings of the original BitTorrent protocol. The goal was to demystify how P2P file-sharing systems operate under the hood by rebuilding the entire processโ€”from chunked file transfer to tracker registration and multi-peer discoveryโ€”entirely in Python.

This project serves as a hands-on implementation for learning about:

  • Networking and sockets
  • Multi-threaded file transfer
  • Hash-based chunk verification
  • Torrent protocol mechanics
  • GUI development with PyQt5

โš™๏ธ Features

  • ๐Ÿ“ .torrent file parsing (bencode decoding)
  • ๐ŸŒ Tracker-based peer discovery
  • โฌ‡๏ธ Multi-peer parallel chunk downloads
  • ๐Ÿงฉ Resume support using JSON
  • ๐Ÿ’ป CLI seeding & uploading with seeding.py and my_server.py
  • ๐Ÿ–ฅ๏ธ PyQt5 GUI interface with progress bar, chunk status, theme toggle, and logo branding

๐Ÿ–ผ๏ธ Screenshots

GUI - Dark Mode

GUI Dark Mode

GUI - Light Mode

GUI Light Mode

๐Ÿ› ๏ธ Tech Stack

Layer Technology
Programming Python 3.10+
GUI PyQt5
Networking socket, requests
Torrent Parsing bencodepy
Parallelism threading
File Handling JSON, Binary I/O

๐Ÿš€ Usage

1. Make torrent file

python chunk_hash.py

2. Start the Tracker

python tracker.py

3. Start Seeder

python automated_seeder.py

4. Launch GUI downloader

python gui.py

๐Ÿงญ Applications

  • ๐Ÿ“ฆ Educational Tool โ€“ Learn how real-world file sharing protocols like BitTorrent work.
  • ๐Ÿ›  Custom P2P Sharing โ€“ Share files within a closed network (classroom, LAN, etc.).
  • ๐Ÿ”„ Resumable Downloads โ€“ Download large files with chunked resume support.
  • ๐Ÿ” Experimentation Base โ€“ Extend to add DHT, magnet links, peer banning, etc.
  • ๐Ÿ’ป GUI Showcases โ€“ Demonstrate PyQt integration with threaded backend systems.

๐Ÿ“š References


๐Ÿ‘จโ€๐Ÿ’ป Developed by - @Arijit2175

About

A simple peer to peer file sharing system inspired by BitTorrent

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages