magneticod

command
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2019 License: AGPL-3.0 Imports: 15 Imported by: 0

README

magneticod

Autonomous BitTorrent DHT crawler and metadata fetcher.

magneticod is the daemon that crawls the BitTorrent DHT network in the background to discover info hashes and fetches metadata from the peers.

Installation

Requirements
  • Decent Internet access (IPv4)

    magneticod uses UDP protocol to communicate with the nodes in the DHT network, and TCP to communicate with the peers while fetching metadata. Please make sure you have a healthy connection; you can confirm this by checking at the connection status indicator of your BitTorrent client: if it does not indicate any error (e.g. a misconfigured NAT), magneticod should just work fine.

Installing the Pre-Compiled Static Binary

You can find the latest pre-compiled static binaries on GitHub for versions from v0.7.0 onwards.

Installing the Docker Image

Docker images are provided on Docker Hub at the repository boramalper/magnetico. Images are tagged as d-vMAJOR.MINOR.PATCH.

Setup

  1. (Optional, requires root) Disable iptables for a specified port:

    iptables -I OUTPUT -t raw -p udp --sport PORT_NUMBER -j NOTRACK
    iptables -I PREROUTING -t raw -p udp --dport PORT_NUMBER -j NOTRACK
    

    This is to prevent excessive number of EPERM "Operation not permitted" errors, which also has a negative impact on the performance.

Configuration

Configuration file can be found at:

  • On Linux

    ~/.config/magneticod/configuration.toml
    

Usage

Database

magneticod is designed to be able to use different database engines to store its data, but currently only SQLite 3 is supported. The database file can be found in:

  • On Linux

    ~/.local/share/magneticod/
    

magneticod uses write-ahead logging (WAL) for its database, so there might be multiple files while it is operating, but database.sqlite3 is the database.

Using the Docker Image

You need to mount

  • the data directory (~/.local/share/magneticod/ on Linux, see the previous sections)
  • the configuration file at (~/.config/magneticod/configuration.toml on Linux, see the previous sections)

hence run:

docker run \
  -v ~/.local/share/magneticod:/root/.local/share/magneticod/ \
  -v ~/.config/magneticod/configuration.toml:/root/.config/magneticod/configuration.toml \
  magneticod

Tip: Containers that you terminate won't be removed; run docker rm $(docker ps -q -f status=exited) to remove exited containers.

Remark About the Network Usage

magneticod does not have any built-in rate limiter yet, and it will literally suck the hell out of your bandwidth. Unless you are running magneticod on a separate machine dedicated for it, you might want to consider starting it manually only when network load is low (e.g. when you are at work or sleeping at night).

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
bittorrent
dht

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL