You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ghost
ad2d154244
|
1 year ago | |
---|---|---|
config | 1 year ago | |
src | 1 year ago | |
.gitignore | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 1 year ago |
README.md
yggtracker-wanted-torrents-receiver
Crontab script that allows to receive wanted torrents from multiple YGGtracker nodes
Install
git clone https://github.com/YGGverse/yggtracker-wanted-torrents-receiver.git
Usage
php src/receiver.php
or
* * * * * /usr/bin/php src/receiver.php > /dev/null 2>&1
Config
All configuration files placed at /config
folder
local.json
{
"import":
{
"ftp": // Common rules for FTP connections
{
"timeout":5, // How many seconds to wait for each provider response
"directories": // Remote folders to grab
[
"all"
]
},
"require":
{
"approved":true // Require approved torrents import only (related to provide.approved option in remote.json for each provider)
},
"storage":
{
"directory":"storage", // Storage directory by default
"common":true // Copy all torrents imported from providers folders to the storage/_common/{hash}.torrent
// This mode check files MD5 hash sum to prevent duplicates in single folder from different providers
// Useful when bittorrent client does not support support listening of multiple folders, recursive mode
}
},
"update":
{
"config":
{
"remote": // This option allows to auto-update remote.json file on the fly without updating codebase with git clone
{
"enabled": true, // If disabled, local file will not be updated, but manually
"cache":86400, // How many seconds to wait before ask repository for remote.json updates (after last file write)
"repository":
"https://raw.githubusercontent.com/YGGverse/yggtracker-wanted-torrents-receiver/main/config/remote.json"
}
}
}
}
remote.json
The remote configuration contains available YGGtracker providers.
File also could be auto-updated from this repository when owner enabled update.config.remote.enabled
option in local.json
that makes registry actualization simpler for recipients and providers, as update details without git pull
.
[
{
"description":
{
"name":"YGGtracker", // Used as storage subfolder
"description":"YGGtracker official node", // Just provider description
"url":"http://[201:23b4:991a:634d:8359:4521:5576:15b7]/yggtracker/" // Provider's website
},
"ftp":
{
"host":"201:23b4:991a:634d:8359:4521:5576:15b7", // Connection host
"port":21, // Connection port
"passive":true, // Recommended passive mode for better compatibility
"username":"anonymous", // YGGtracker instances usually provides public FTP access
"password":"anonymous",
"directory":"/yggtracker/torrents/wanted" // Directory where wanted torrent files placed
},
"provide":
{
"approved":true // Tells to receiver that node administrator check the torrents before send to API
}
}
],
...
Bash, python?
Feel free to contribute!
Add new YGGtracker node
Just send PR to nodes.json file
Feedback
Any questions and bug reports, please send to the Issues!