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.12.0 onwards.
Compiling yourself
If you can't run the release binaries provided by me, just follow the usual clone and make.
git clone --depth=1 https://github.com/ez-me/magnetico.git
cd magnetico
make magneticod
Setup
-
(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.
Usage
Database
magneticod
is designed to be able to use different database engines to store its data, but
currently only SQLite 3 and PostgreSQL 9+ are supported.
SQLite
The database file can be found in:
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.
More engines (PostgreSQL and others)
You can read about other supported persistence engines here.
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).
Consider passing the flag --indexer-interval=n
with n
being a few seconds between operations (more than 1)