Skip to content

A lightweight and efficient BitTorrent client implemented in Go, supporting both torrent files and magnet links.

Notifications You must be signed in to change notification settings

YashSaini99/bittorent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go BitTorrent Client

A lightweight and efficient BitTorrent client implemented in Go, supporting both torrent files and magnet links.

Features

  • Download torrents using .torrent files or magnet URLs
  • Progress bar with real-time download statistics
  • Docker support for easy deployment
  • Configurable download directory
  • Graceful shutdown handling

Installation

Using Docker

# Pull from Docker Hub
docker pull yashsaini99/bittorrent

# Or build locally
docker build -t bittorrent .

Building from Source

# Clone the repository
git clone https://github.com/yashsaini99/bittorrent.git

# Navigate to project directory
cd bittorrent

# Build the project
go build

Usage

Docker Usage

# Using magnet link
docker run -v $(pwd)/downloads:/app/downloads yashsaini99/bittorrent -output /app/downloads -magnet "your_magnet_url"

# Using torrent file
docker run -v $(pwd):/app/torrents -v $(pwd)/downloads:/app/downloads yashsaini99/bittorrent -output /app/downloads -torrent "/app/torrents/file.torrent"

Command Line Usage

# Using magnet link
./bittorrent -magnet "your_magnet_url" -output "./downloads"

# Using torrent file
./bittorrent -torrent "path/to/file.torrent" -output "./downloads"

Command Line Arguments

  • -magnet: Magnet URL for the torrent
  • -torrent: Path to .torrent file
  • -output: Directory for downloaded files (default: "downloads")

Dependencies

Building the Docker Image

docker build -t bittorrent .

About

A lightweight and efficient BitTorrent client implemented in Go, supporting both torrent files and magnet links.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published