Skip to content

Features

d47081 edited this page Oct 24, 2023 · 23 revisions

The Wanted

Feature implemented in YGGtracker v.2.2.0 and allows to download any torrent file from catalog trough Yggdrasil protocol.

Overview

When torrent, just uploaded to catalog, have leechers, but have no seeders (in Yggdrasil network), this torrent marked by YGGtracker as the "Wanted". Another users able to download raw torrent file (that includes all trackers) by click on the "Wanted" label. When file have downloaded by someone or server-side bot, this peer sending announcement to Yggdrasil trackers and other peers able to download it trough Yggdrasil network.

To automate seeding process for active members, YGGtracker provides additional interfaces (#27) like anonymous FTP with wanted files that filtered by context. These files could be processed by any Bittorrent servers using autos-can directory option.

For regular users, who wish to participate shares, the "Wanted" notifications available in activity dashboard (when enabled in settings)

  • Note: regular torrent downloads have appname#torrentID prefixes that includes account settings. Wanted files have wanted#torrentID prefixes and includes all possible announcers for seeding nodes. That's needed to semantically understand torrent-file meta data without opening (eg data leak to global network)

At this moment, FTP storage contain following sub-directories that implement filters by torrent content:

  • /yggtracker/torrents/wanted/all - any torrent wanted
  • /yggtracker/torrents/wanted/locale/en - torrents wanted by content locale
  • /yggtracker/torrents/wanted/sensitive/no - sensitive-filtered torrents

* yggtracker is default namespace and depends of APP_TORRENT_WANTED_FTP_FOLDER settings, provided in .env

When the wanted torrent get at least one seeder, YGGtracker scraper (which running in Crontab) auto-removes deprecated files from storage.

FTP server

If you're maintainer of YGGtracker instence, bellow provided example how to setup vsftpd FTP server on Debian-based systems, where YGGtracker installation placed in /var/www/YGGverse/YGGtracker directory

  1. Install vsftpd server
apt install vsftpd
  1. Create folder and grant web-server permissions (usually www-data)
mkdir /var/www/YGGverse/YGGtracker/var/ftp
chown www-data:www-data /var/www/YGGverse/YGGtracker/var/ftp
  1. Edit /etc/vsftpd.conf file as below
listen_ipv6=YES
anonymous_enable=YES
local_enable=NO
anon_root=/var/www/YGGverse/YGGtracker/var/ftp
no_anon_password=YES
hide_ids=YES
pasv_min_port=40000
pasv_max_port=50000
  1. Allow Yggdrasil connections in firewall rules
ufw allow proto tcp from 0200::/7 to any port 21
ufw allow proto tcp from 0200::/7 to any port 40000:50000
  1. Restart vsftpd service
service vsftpd restart

BitTorrent client

Popular clients like qBittorrent, Transmission, etc allows to listen local directory for new torrents and auto download them. This feature pretty useful for YGGtracker instance administrators or independent seedbox operators who interested in Yggdrasil popularity grow.

Create local mirror

Recommended and simpler way for seeders to receive wanted torrents from all YGGtracker nodes - install officially maintained yggtracker-wanted-torrents-receiver

Script supports additional features like collecting all unique torrents to single directory when Bittorrent client does not support multiple directories to listen or can't scan in recursive mode. It also prevents FS virtualization issues. Seedbox owner also don't need to setup every provider separately with rclone or similar software.

All that you need is make

git clone https://github.com/YGGverse/yggtracker-wanted-torrents-receiver.git

Then run crontab script

* * * * * /usr/bin/php src/cli.php > /dev/null 2>&1

Do not forget to provide listening directory. For qBitTorrent it is:

Web UI → Preferences → Download → Automatically add torrents from

Mount remote folder

On Linux systems, remote FTP folder could be mounted using curlftpfs, rclone and many other tools - with GUI or CLI.

On this example used qbittorrent-nox (server-side qBittorrent client with web UI) to auto-sync wanted torrent files.

  1. Bittorrent clients usually works with local directories only, let's mount /yggtracker/torrents/wanted/all using rclone
apt install rclone
  1. At second step, we need to create remote FTP configuration
rclone config

n) New remote

name> yggtracker
Storage> ftp
host> [201:23b4:991a:634d:8359:4521:5576:15b7] // just official node, for example
port>21 // or keep default
user>anonymous // usually, FTP server allows anonymous access, this username / password required by protocol just
password>anonymous
...
// provide  other answers by default.

  1. Let's create mount point and set permissions for qbittorrent-nox
mkdir /home/qbittorrent-nox/yggtracker
chown qbittorrent-nox:qbittorrent-nox /home/qbittorrent-nox/yggtracker
  1. Now we can mount remote storage to this folder
rclone mount yggtracker:/yggtracker/torrents/wanted/all /home/qbittorrent-nox/yggtracker &
  • make sure that remote directory exists, as YGGtracker creates target directory with first wanted file initiation only
  • to unmount directory, just use umount /home/qbittorrent-nox/yggtracker

Check mount success:

df -h
> yggtracker:/yggtracker/torrents/wanted/all  1.0P     0  1.0P   0% /home/qbittorrent-nox/yggtracker

To mount remote folder every time on client startup and unmount on exit, add following lines to /etc/systemd/system/qbittorrent-nox.service

ExecStartPre=/usr/bin/rclone mount --config /home/qbittorrent-nox/.config/rclone/rclone.conf --daemon --read-only yggtracker:/yggtracker/torrents/wanted/all /home/qbittorrent-nox/yggtracker
ExecStop=/usr/bin/umount /home/qbittorrent-nox/yggtracker

then reload:

systemctl daemon-reload
service qbittorrent-nox restart
  • --config option required
  • --dir-cache-time, --poll-interval, --attr-timeout options could be useful to enforce mount point updates
  • If the mount operation running from another user, just add + at beginning of command, but rclone does not require root at all.
  1. At last step, lets setup qBittorrent to listen /home/qbittorrent-nox/yggtracker folder for new "Wants":

Web UI → Preferences → Download → Automatically add torrents from

also, take a look on following option to copy remote torrents locally

Web UI → Preferences → Download → Saving Management → Copy .torrent files to

Clone this wiki locally