swetorrentking / rartracker

Complete private bittorrent tracker written in PHP and AngularJS
199 stars 67 forks source link

Tracker status "Not Working" in qBittorent #30

Closed RobinHoutevelts closed 8 years ago

RobinHoutevelts commented 8 years ago

Hi swetorrentking,

I finally got around forking to help with the PHP side of things.

However, I have little experience with setting up my own tracker and I'm running into some issues:

So is this an issue with me not understanding how clients communicate with trackers or could it be something else?

RobinHoutevelts commented 8 years ago

Nevermind, I'm an idiot ( qbitorrent isn't whitelisted and json_encode I used to prettyfy my logs returned false ).

Works like a charm

ihv40894 commented 8 years ago

How do you whitelist certain torrent clients?

RobinHoutevelts commented 8 years ago

In /tracker.php you'll find the $bannade variable.

There you can add the user agent of a torrent client.

The user agent is stored with each request in $_SERVER['HTTP_USER_AGENT']

Here's a snippet I use to store all HTTP data in a log so I can analyse it later. I've put it at the top of /tracker.php

<?php

$requestInfo = [
    'SERVER' => $_SERVER,
    'REQUEST' => $_REQUEST,
    'GET' => $_GET,
    'POST' => $_POST
];
$requestInfo = print_r($requestInfo, true);
$logFile = fopen('tracker.php.log', 'a');
fwrite($logFile, $requestInfo);
fclose($logFile);

The user agent of my qBittorent for example was qBittorrent v3.3.4 and for my rtorrent client it was rtorrent/0.9.2/0.13.2.

ihv40894 commented 8 years ago

I was under the impression that listing clients under the $bannade variable banned or blacklisted those clients. That is for whitelisting them? Have you tried deluge with this tracker?

RobinHoutevelts commented 8 years ago

Nope you are absolutely right.

I'm just being dumb today. Haven't tried deluge, will do so tomorrow.

Op 27-aug.-2016 8:16 PM schreef "ihv40894" notifications@github.com:

I was under the impression that listing clients under the $bannade variable banned or blacklisted those clients. That is for whitelisting them? Have you tried deluge with this tracker?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/swetorrentking/rartracker/issues/30#issuecomment-242932427, or mute the thread https://github.com/notifications/unsubscribe-auth/AIoxsfZCk8h3s0AQ_4htJBfGXVg8ThdDks5qkH8RgaJpZM4JutVl .

ihv40894 commented 8 years ago

I still can't get mine to work with qBittorrent or Deluge, for some reason Transmission works.

http:/rartracker.dev/tracker.php/c42ac92186de41cacc9b291385ea62bd/announce

I was thinking it had something to do with client not knowing what to do with announce url after tracker.php but thats a total guess and have no actual proof.

http://stackoverflow.com/questions/14789604/directory-hierarchy-after-index-php

If you figure this out, please let me know. Thanks.


EDIT

I tried your code to make the log file for tracker.php. When I accessed the tracker.php from transmission or my web browser it made an entry in the log file. When I tried qBittorrent, it did nothing. Starting to really look like some clients are having a hard time with the announce url?

You should open this issue back up.

RobinHoutevelts commented 8 years ago

Here everything goes fine.

I create the torrent in qBittorent:

Then I upload the created torrent. After uploading I download the .torrent file from the site ( now the tracker-url is overwritten and my passkey is inserted ).

I load the downloaded .torrent file in qBittorent and it's stuck on waiting. This is normal because the files aren't at the expected location. ( Note: I don't have the "Not working" issue anymore )

I right-click on my torrent in qBittorent and choose "open destination folder"Could be named something else. I'm using a translated version of qBittorent Then an explorer opens and I copy the files of my torrent into the opened directory and close it.

Finally I right-click on my torrent again and select "Force recheck". Now qBittorent sees I already have the files, checks the integrity and changes the status to seeding.


When I create a second account, download the torrent again and load it in another client everything transfers smoothly.

Edit

Tried Deluge; works fine as well

ihv40894 commented 8 years ago

Hmm, I'm doing the same thing and mine is saying not working still. I wonder if its because it's behind cloudflare?

RobinHoutevelts commented 8 years ago

Are you seeing qBittorent's http-requests in the apache log file?

ihv40894 commented 8 years ago

No I don't see them in there at all. I see some old ones from transmission, but no qBittorrent.

RobinHoutevelts commented 8 years ago

When you open qBittorent and go to the "trackers" tab of your torrent. What URL do you see?

Example: screenshot

ihv40894 commented 8 years ago

https://mysite.com/tracker.php/code/announce

status: not working peers: 0

Thinking it may have to do with python having issues with cloudflare ssl. Would make sense why transmission worked and qBittorrent and Deluge didnt.

https://support.cloudflare.com/hc/en-us/articles/203041594-What-browsers-work-with-CloudFlare-s-SSL-certificates-


EDIT

It was in fact cloudflare free universal ssl that was messing it up. I guess python 2.X cannot support their new fancy ssl certificates. I either had to upgrade to their pro version or buy my own ssl. I will be getting my own. I guess python 2.x struggles with ECDSA.