Btiteam / XBTIT Forum

xbtit => XBTIT Support => Topic started by: fatdragon on October 11, 2019, 11:54:37 PM

Title: Ratio checker
Post by: fatdragon on October 11, 2019, 11:54:37 PM
Hi Guys, This is DrAgon from years ago, I wrote few mods and hacks back in the early days of btit and xbtit in this forum. Anyways, I couldn't find my username/rank , so I created new username!

So, we had a hack Download Ratio Checker which was excellent start for my private tracker back then and then I wrote few hacks for xbtit and an addendum hack for Ratio Checker as well and shared it here too.

It has been very long time ago but  I remember that Download Ratio checker would check if ratio is above a specified threshold set in config and then would allow people to download torrent. I also remember that I had my tracker set to allow only two downloads at a time if ratio is good , but if ratio is below the threshold it would not allow user to download even if he is downloading 4 torrents at the time and if he goes below the threshold , then the tracker would stop his download from seeders. How did I achieve this before?

I had this working before for years, somehow now it is not working on my old tracker.. Does anyone knows what I am talking about?

Did I modify announce to do this and let other seeders not to seed to him and block him from downloading?
Maybe it was Petr1fied's  download ratio checker that was doing that? but where was it checking the ratio?

btw..I still have a todo for upgrade to 2.6.1 that needs to happen soon! I know it has been a long while!

Thanks for your help!

-DrAgon (fatdragon)
Title: Re: Ratio checker
Post by: fatdragon on October 12, 2019, 11:15:45 AM
I just checked and I see that two active torrent per member group is set and so when they sign up , and download 10 torrents and ratio goes beyond the threshold, they are still connected to the seeders and other peers and can continue finishing the 10torrents they are in progress!

I thought there was a way to fix this so they don't download 10 torrents while their ratio is below the threshold!
Title: Re: Ratio checker
Post by: fatdragon on October 12, 2019, 04:56:41 PM
Ok I think I got it!
is working just need to filter all bad torrent client software somewhere in announce or scrape and etc.

still working on it.. but I like the result like I had before!

Here is the list that has been approved by other private trackers,  that I am checking only few of them that will work with my private tracker with two torrent at a time and ratio over 0.5

qBittorrent (both Pc and Mac)
BitTorrent 6 0
Deluge 1.3.1
Deluge 1.3.5
Deluge 1.3.6
Deluge 1.3.11
rTorrent 0.8.1 > 0.9.2
Transmission 2.03
uTorrent 1.6.1
uTorrent 2.2.0 Build 23071
uTorrent 2.2.1 Build 25154
uTorrent 3.2.2 Build 28500
uTorrent 1.5.14 Build 26699 MAC
uTorrent 1.8.40 Build 29971 MAC
Title: Re: Ratio checker
Post by: fatdragon on October 12, 2019, 06:25:59 PM
yes.. $agent filter in announce works .have to do some coding  ;D
not too old for coding yet! but  retirement is much easier! lol!
Title: Re: Ratio checker
Post by: fatdragon on October 17, 2019, 11:02:01 AM
Here is the quick hack for only allowing certain client torrents (agents you would like to allow to talk to the tracker).
I have narrowed it down to very old clients that talk proper bittorrent protocol and report statistics properly to the tracker and doesn't send bad data that administrator might mistakenly recognize the member as using a cheating client!  The list I will add more when I find time to verify more of these old clients!

after agent variable is declared in announce.php

add following code and modify it based on whatever you like to set it to!

so since utorrent is reporting build numbers with version in the agent..I am removing the parentheses first and then I do a match with complete utorrentversionbuildno agent string and then I am filtering only the clients I like to allow at this time.

what's happening with the style on this page..I can't read using the colors used in the code and in general the colors need to change, make it easier to read!

Code: [Select]
if (strpos($agent, 'uTorrent') !== false) {
    $agent = preg_replace('/\(|\)/','',$agent); }

$clientlist = array('qBittorrent/4.1.8', 'Deluge 1.3.11', 'Deluge 1.3.6', 'Transmission/2.94', 'Transmission/2.03', 'rtorrent/0.9.2/0.13.2', '
Azureus;Windows 10;Java 1.8.0_221', 'uTorrent/221025154', 'uTorrent/22023071', 'uTorrent/32228500', 'uTorrentMac/187043796');

if(str_replace($clientlist, '', $agent) != $agent){
 else {
    show_error("Client Error! Must read http://www.xxxxxxx/clientguide.html");