dessalines / torfiles

An open-source torrent searching serice
GNU General Public License v3.0
15 stars 1 forks source link

TorFiles — An open-source search engine for finding files within torrents.

Build Status

TorFiles is an open-source, self-hostable service for storing, sharing, and searching not just torrents, but all files within the torrents.

You can now search for:

It features:

Tech used:

Installation

Requirements

Download TorFiles

git clone https://github.com/dessalines/torfiles

Setup a postgres database

psql -c "create user torfiles with password 'asdf' superuser;" -U postgres
psql -c "create database torfiles with owner torfiles;" -U postgres

Or here are some instructions to get your DB up and running.

Edit your pom.xml file to point to your database

cd torfiles
vim service/pom.xml

Edit it to point to your own database:

<!--The Database location and login, here's a sample-->
<jdbc.url>jdbc:postgresql://127.0.0.1/torfiles</jdbc.url>
<jdbc.username>torfiles</jdbc.username>
<jdbc.password>asdf</jdbc.password

Install TorFiles

Running locally:

./install_dev.sh and goto http://localhost:4567/

for a production environment:

You can redirect ports in linux to route from port 443, or 80 to this port:

sudo iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 4567

Install p2pSpider

git clone https://github.com/dessalines/p2pspider
cd p2pspider
vim index.js

Edit the client to point to your DB:

const client = new Client({
  user: 'torfiles',
  host: 'localhost',
  database: 'torfiles',
  password: 'asdf',
});

Run p2pSpider:

npm i
node index.js

Or use pm2 to start multiple instances of it, to crawl faster:

npm i -g pm2
pm2 start index.js -i 5

This will start running p2pspider, which crawls the DHT to download torrents and peers, and saves them to your database. It will take a few days for your database to fill up.


Bugs and feature requests

Have a bug or a feature request? If your issue isn't already listed, then open a new issue here.