Skip to content

tgragnato/magnetico

 
 

Repository files navigation

magnetico

Autonomous (self-hosted) BitTorrent DHT search engine suite.

Go CodeQL Go Report Card

Flow of Operations

magnetico is the first autonomous (self-hosted) BitTorrent DHT search engine suite that is designed for end-users. The suite consists of two packages:

  • magneticod: is the daemon that crawls the BitTorrent DHT network in the background to discover info hashes and fetches metadata from the peers.
  • magneticow: is a lightweight web interface to search and to browse the torrents that its counterpart discovered.

Both programs, combined together, allows anyone with a decent Internet connection to access the vast amount of torrents waiting to be discovered within the BitTorrent DHT space, without relying on any central entity.

magnetico liberates BitTorrent from the yoke of centralised trackers & web-sites and makes it truly decentralised. Finally!

Features

Easy installation & minimal requirements:

  • Easy to build golang static binaries.
  • Root access is not required to install or to use.

Magneticod

magneticod trawls the BitTorrent DHT by "going" from one node to another, and fetches the metadata using the nodes without using trackers. No reliance on any centralised entity!

Unlike client-server model that web applications use, P2P networks are chaotic and magneticod is designed to handle all the operational errors accordingly.

High performance implementation in Go: magneticod utilizes every bit of your resources to discover as many infohashes & metadata as possible.

Magneticow

magneticow features a lightweight web interface to help you access the database without getting on your way.

If you'd like to password-protect the access to magneticow, you need to store the credentials in file. The credentials file must consist of lines of the following format: <USERNAME>:<BCRYPT HASH>.

  • <USERNAME> must start with a small-case ([a-z]) ASCII character, might contain non-consecutive underscores except at the end, and consists of small-case a-z characters and digits 0-9.
  • <BCRYPT HASH> is the output of the well-known bcrypt function.

You can use htpasswd (part of apache2-utils on Ubuntu) to create lines:

$  htpasswd -bnBC 12 "USERNAME" "PASSWORD"
USERNAME:$2y$12$YE01LZ8jrbQbx6c0s2hdZO71dSjn2p/O9XsYJpz.5968yCysUgiaG

Screenshots

The Homepage Searching for torrents Search result
The Homepage Searching for torrents Viewing the metadata of a torrent

Why?

BitTorrent, being a distributed P2P file sharing protocol, has long suffered because of the centralised entities that people depended on for searching torrents (websites) and for discovering other peers (trackers). Introduction of DHT (distributed hash table) eliminated the need for trackers, allowing peers to discover each other through other peers and to fetch metadata from the leechers & seeders in the network. magnetico is the finishing move that allows users to search for torrents in the network, hence removing the need for centralised torrent websites.

About

Autonomous (self-hosted) BitTorrent DHT search engine suite

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Go 96.2%
  • JavaScript 2.1%
  • CSS 1.1%
  • HTML 0.5%
  • Shell 0.1%
  • Dockerfile 0.0%