News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[WIP mod] Bittorrent Tracker for SMF 2.0RC3

Started by niko, May 15, 2008, 04:24:59 PM

Previous topic - Next topic

Arantor

Instead of just stating "Admin error" - please state WHAT error you get. Just telling us there's a problem cannot help us fix it.

towerboy08

When i go to install it keeps saying corrupt or no supported. the newest version gives me a white page when i click install. Any help people?

NeKit1000

Quote from: cieplutki on December 08, 2009, 02:45:28 PM
worked mod on smf 2.0 RC2 on attachment  ;)
Thanks! It works without any problems.

But still, it would be nice to have overall user statistics and ratio. Anyway, it is better, if you just want simple tracker feature and have existing SMF forum, than installing TBDev or something like it.

vadim s. sabinich

Quote from: cieplutki on December 08, 2009, 02:45:28 PM
worked mod on smf 2.0 RC2 on attachment  ;)
but i have question:
on utorrent with section tracker i have message : Yuo are not authorized to use this tracker

whay
thanks!

$p00ky

#85
Very nice mod.

But there is an error on RC1.2.

Installation of rev108 works fine.
Adding a torrent through an attachment works fine.
Stats works fine (I see myself seeding or leeching when I do).

Except proper Leeching/Seeding does not work.
BitTorrent Client error: Tracker sending invalid data: <NULL>

Error on the announce.php call: (no matter if p=xxx is passed as parameter or not)
Notice: Undefined index: default_theme_dir in /var/www/Sources/Load.php on line 1866

Notice: Undefined index: default_theme_dir in /var/www/Sources/Load.php on line 1884

Warning: Cannot modify header information - headers already sent by (output started at /var/www/Sources/Load.php:1866) in /var/www/Sources/Subs-Tracker.php on line 671
d14:failure reason35:Your client sent an invalid requeste


There is another "problem" on the output template.
The print_r() call leads to a raw print of the array without any formatting, like that:
<div class="tborder">
<table class="bordercolor" border="0" cellpadding="4" cellspacing="1" width="100%">Array
(
    [0] => Array
        (
            [name] => My_Torrent.zip
            [link] => <a href="http://www.example.com/index.php?action=tracker;torrent=1">My_Torrent.zip</a>
            [href] => http://www.example.com/index.php?action=tracker;torrent=1
            [download_link] => <a href="http://www.example.com/index.php?action=tracker;sa=download;torrent=1">My_Torrent.zip</a>
            [download_href] => http://www.example.com/index.php?action=tracker;sa=download;torrent=1
            [delete_link] => <a href="http://www.example.com/index.php?action=tracker;sa=delete;torrent=1">Delete</a>
            [delete_href] => http://www.example.com/index.php?action=tracker;sa=delete;torrent=1
            [size] => 1.57 MiB
            [size_bytes] => xxxx
            [num_seeders] => 1
            [num_leechers] => 0
            [downloads] => 0
            [transfer] => 0.00 B
            [category] => Array
                (
                    [id] => 0
                    [name] =>
                    [link] => <a href="http://www.example.com/index.php?action=tracker;category=0"></a>
                )

            [uploader] => Array
                (
                    [id] => 387
                    [name] => $p00ky
                    [link] => <a href="http://www.example.com/profile/user/">User</a>
                )

            [added] => <strong>Today</strong> at 14:41:20
            [last_action] => <strong>Today</strong> at 14:52:54
        )

)

</table>
</div>

I don't know if it's a bug or if it means we have to design ourselves how to show the torrents list to our visitors?

Also, is it possible to allow DHT, Local Peer Discovery and Peer Exchange options? (it is currently forbidden and we don't have choice)
$p00ky @ EroGaKi

$p00ky

OK, I found a quick fix to the "headers" problem.

If error_reporting is set to E_ALL, some notices may appear (such as in my previous code example) which initiates the header.
So you have to change the error_reporting() function at the top of announce.php to E_STRICT to fix this problem.

error_reporting(E_STRICT);

So now the BT client (uTorrent) has the following error:
Failure: Your client sent an invalid request

And if I manually call the announce.php?p=xxx page:
d14:failure reason35:Your client sent an invalid requeste

Note that there is an ending "e" on the announce.php manual call, is it normal?

How can I fix this problem? Is it due to uTorrent (I doubt about it) or the mod parsing?
$p00ky @ EroGaKi

$p00ky

#87
Sorry for the triple post...

I found the source of the problem.
It's in the "peer_id" that is not sent by the BT client.

Why do you require a peer_id?

File Subs-Tracker.php around line 775
if (empty($_REQUEST['peer_id']) || strlen($_REQUEST['peer_id']) != 20)
btFatalError($txt['invalid_request']);


The seed is not working because of this check.
$_REQUEST['peer_id'] is empty, so the announce fails.


I changed the code in Subs-Tracker.php as follows:
if (empty($_REQUEST['peer_id']) || strlen($_REQUEST['peer_id']) != 20) {
$debug_bt = "";
foreach ($_REQUEST as $cle => $valeur)
$debug_bt .= " | " . $cle . "=" . $valeur;
btFatalError($txt['invalid_request'] . $debug_bt);
}


To check what the tracker sends, and it sends an empty "peer_id" but "no_peer_id=1".
Failure: Your client sent an invalid request | p=right_p | info_hash= | peer_id= | port=my_port | uploaded=0 | downloaded=0 | left=0 | corrupt=0 | key=a_key | event=started | numwant=200 | compact=1 | no_peer_id=1 | ipv6=my_ipv6

Why are the "info_hash" and "peer_id" empty?

I "faked" a call to announce.php with the valid info_hash and with the 20 first characters of "p" as the peer_id and it seems to work:
d8:completei1e10:incompletei0e8:intervali1200e12:min intervali600e5:peers0:e

The question is: why the BT client does not send "info_hash" nor "peer_id", or why does the script doesn't decode the values of peer_id and info_hash sent by the client?



SOLUTION FOUND:

Do not clean the request in the announce.php file.
Remove (or comment) any cleanRequest or get_magic_quotes_gpc :

//cleanRequest();

//if (get_magic_quotes_gpc() != 0)
// $_GET = stripslashes__recursive($_GET);
$p00ky @ EroGaKi

Weedman

This installed np on rc 2 using posted attachment (108). There is supposed to be user stats? Where do i view them? In admin>tracker settings there is just a few settings for the actual tracker and I see nowhere to view any other information on the torrents.


busterone

It appears that this one has been put on the backburner or forgotten for some time. I tried it out on RC1.2 but eventually uninstalled it. It has potential, but is a very long way from being completed.

niko

Websites: Madjoki || (2 links retracted by team, links out of date and taken over.)
Mods: SMF Arcade, Related topics, SMF Project Tools, Post History

WIP Mods: Bittorrent Tracker || SMF Wiki

busterone




busterone

Niko, I am curious about the torrent categories and how to implement them. Am I overlooking something or is it a part of the mod that is unfinished? I see categories in the code and templates, but I do not see how they are to be set up and how to upload a torrent to a select category. My coding skills are not that good, so I realize that I may be simply overlooking it.

KensonPlays

#96
Will this work with 2.0 RC3?

Edit:
Installs with NO ERRORS!!!!

EDIT2:
how it work exactly?

DoctorMalboro

Quote from: Kcmartz on June 20, 2010, 02:02:25 AMWill this work with 2.0 RC3?

Edit:
Installs with NO ERRORS!!!!

EDIT2:
how it work exactly?
It's a bittorrent tracker... so people can get torrents and download stuff...

busterone

Quote from: Kcmartz on June 20, 2010, 02:02:25 AM
Will this work with 2.0 RC3?

Edit:
Installs with NO ERRORS!!!!

EDIT2:
how it work exactly?
The tracker part works very well on rc3. I have tested it out with a few select members. The torrent file is uploaded into a post as an attachment. They can then download it from the post or from the torrent listing at ./index.php? action=tracker It also adds statistics in your profile. It is very basic, but solid. Nice work so far.

Aasgard

Hello guys,

I have installed this mod on a SMF 2.0 RC3. The problem is I can not make it work. When im trying to download it keeps saying me that im not authorised to use this tracker. Could anyone help me?

Thanks

Advertisement: