Generic tracker API to interact with ATUS.
This API was build to make it easy to set up and to work with as many different tracker configurations as possible.
The default configuration should be seen as a starting point and should be adjusted to your needs.
We have presets for TBDev and NetVision, but depending on your setup, you may need to heavily modify the code to make it work.
The installation guide assumes that you are running a linux system with nginx and php5.6 or higher installed.
You need a running and web accessible instance of ATUS.
- NGINX configuration
- API installation
- Frontend configuration
We need to set up a reverse proxy to securely serve release images, screenshots and stream sample videos directly from the ATUS server to your users.
Add the following snippet to your tracker's NGINX vhost configuration:
location /atus-proxy/ {
limit_except GET {
deny all;
}
# Replace [ATUS-SERVER-IP] with the IP of your ATUS server
proxy_pass http://[ATUS-SERVER-IP]:8000/api/;
proxy_http_version 1.1;
proxy_cache_bypass $http_upgrade;
# Enter your authentication token here
# You can find the token in your ATUS webinterface under "API"
proxy_set_header Authorization "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
-
Clone this repository and copy the
atus
folder to your tracker's root directory. -
Make the
atus/data
folder writable by your webserver.chown -R www-data:www-data atus/data
chmod -R 0700 atus/data
-
Open
atus/config.php
and enter your settings. -
Open
atus/Release.php
.
This is where you define how a new upload is handled.
Read the comments carefully and modify the code to fit your tracker's needs.
You can always see if your code is working by uploading a test release through the ATUS webinterface under "Upload Settings" -> "Upload Test Release".
-
Open your
details.php
file and find the following code:$HTMLOUT .= tr("{$lang['details_info_hash']}", $row["info_hash"]);
-
Add the following code below:
require_once __DIR__ . '/atus/mixins/details.php';
-
Open your
index.php
file and find the following code:$HTMLOUT = '';
-
Add the following code below:
if (isset($CURUSER)) { require_once __DIR__ . '/atus/mixins/upcoming-releases/index.php'; }
-
Open your
details.php
file and find the following code:tr("Hash-Wert", preg_replace_callback('/./s', "hex_esc", hash_pad($row["info_hash"])));
-
Add the following code below:
require_once __DIR__ . '/atus/mixins/details.php';
-
Open your
index.php
file and find the following code:<center><b> <img src="<?= $GLOBALS["PIC_BASE_URL"] ?>star16.gif"> <a href="donate.php">Spende, um den Tracker zu erhalten!</a> <img src="<?= $GLOBALS ["PIC_BASE_URL"] ?>star16.gif"></b></center> </span></td> </tr> </table> <br>
-
Add the following code below:
<?php if (isset($CURUSER)) { require_once __DIR__ . '/atus/mixins/upcoming-releases/index.php'; } ?>