A simple web interface for downloading torrent files. Just provide the magnet
link or .torrent
file url and sit back. The request is forwaded to a golang executable(compiled from github.com/anacrolix/torrent/tree/master/cmd/torrent
) that gets the job done. This is very minimalistic implementation of github.com/anacrolix/torrent
library along with Node.js
and jQuery
. File browsing is provided by h5ai
file indexer that has many great features.
- Home Page
- Download List
- Steps to setup
- Clone this repository to
/var/www/html/torrent
- Give
rwx
permissions to thefiles
directory by runningsudo chmod -R o+rwx files
- After that, install following packages
sudo apt install apache2 php libapache2-mod-php php7.4-gd ffmpeg zip graphicsmagick -y
- Install latest version of Node.js Make sure to select
Linux Binaries (x64)
- Open the file
/etc/apache2/mods-available/dir.conf
and edit the line beginning withDirectoryIndex
, add this/torrent/files/_h5ai/public/index.php
at the end - The
goLeecher_x64
binary provided here may not work on your system so we need to build it.- Install the latest version of go
- Install
build-essential
package bysudo apt install build-essential -y
- Clone this repository github.com/anacrolix/torrent.git at
$HOME
- Replace
$HOME/torrent/config.go
and$HOME/torrent/cmd/torrent/main.go
with/var/www/html/torrent/go/src/github.com/anacrolix/torrent/config.go
and/var/www/html/torrent/go/src/github.com/anacrolix/torrent/cmd/torrent/main.go
respectively - Open a terminal and navigate to
cd $HOME/torrent/cmd/torrent/
and entergo install
command - After the process completes, you'll find the binary at
$HOME/go/bin/torrent
Rename it togoLeecher_x64
- Now replace
/var/www/html/torrent/websocket/goLeecher_x64
with the$HOME/go/bin/goLeecher_x64
- Start the websocket server by executing
cd /var/www/html/torrent/websocket && node server.js
command - Restart the
apache2
server and go tolocalhost/torrent
- Steps to setup using docker
- Download the
deploy.sh
file and give itexecute
permission - Make sure to have
git
anddocker
installed. - Just run the
deploy.sh
file and navigate tolocalhost:8090
- To stop the containers, execute
docker stop torrent-ws torrent-httpd