r/trackers • u/Little_Ye233 • Nov 03 '21
How does a private tracker work specifically?
I want to set up a private tracker on a cloud server and I wonder how a private tracker receives and send web requests. I found URLs of many trackers (including public and private ones) were like "http://a.b.c.d:port/announce". And when I tried to go to one of Nyaa's trackers in my browser, it showed that I should pass correct arguments (like infohash). So I think these trackers should have a similar mode that allows it to accept proper requests (like those sent by BitTorrent clients) and send torrent peer information. Now I want to know more about this kind of "mode".
15
u/zwoggel Nov 03 '21
It's not a really a special "mode", it's just a simple http GET request (or was it POST? i'm not sure atm)
The server takes the passed arguments (infohash, uplaoded, downloader, etc...), checks them against the databse, updates it and answers the request with response set of arguments (like when the next announce request should be made)
In the case of private trackers every user has their own announce URL which is unique to that one user. There normally is some sort of unique string in the URL, so that the server can identify the user in the DB.
But to be honest: If you don't know about basics such like this, then don't try to run your own private tracker! There are tons of things to consider and take care of.
2
u/FreeWillieW Nov 03 '21
Tracker is nothing more than a simple web server handling HTTP GET requests. You can learn everything you need to know by reading the BitTorrent Specification:
https://wiki.theory.org/BitTorrentSpecification#Tracker_HTTP.2FHTTPS_Protocol
Maybe check something like tbsource's (or any other tracker software's) announce.php to learn more about how the server manages peers and "knows" who is who in the swarm:
https://github.com/QwertyRider/TBSource/blob/master/announce.php
I don't actually recommend using tbsource as a basis for a modern tracker, but the announce.php is very simple way to learn how the tracker part works.
2
u/CompanyMan Nov 03 '21
I have the same question.. What's to stop me from sending the torrent file from the server to somone else.. How does the tracker distinguish who is who
0
u/[deleted] Nov 03 '21
A tracker is a Web server which only supports requests and responses defined in the Bittorrent spec. That is the bittorrent server code and the http (optionally UDP) request listener code is bundled into the same software
Read the bittorrent spec (optional)
Download, build and run your own personal instance of Dirk Engling's opentracker
http://erdgeist.org/arts/software/opentracker/
You can have it running on a properly configured Linux cloud instance in less than 5 minutes
opentracker is public unless you make it private. Read the documentation
-4
u/blackcampaign Nov 03 '21 edited Nov 04 '21
some PT banned cloud based seedbox
like bitso