Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.1

Request #14013 No Detection For Private Torrents
Submitted: 2008-05-29 08:00 UTC Modified: 2008-06-12 04:53 UTC
From: wab6 Assigned: tacker
Status: Closed Package: File_Bittorrent2 (version 1.1.0)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2008-05-29 08:00 UTC] wab6 (William Booth)
Description: ------------ A Widely used feature on private trackers is the "private" flag. I wish to request that File_Bittorrent2 includes a boolean if the torrent is private.

Comments

 [2008-05-29 10:01 UTC] wab6 (William Booth)
For some weird reason I can't attach a patch, so here's the diff. File/Bittorrent2/Decode.php 144,148d143 < < /** < * @var boolean If the private flag is set on the torrent < */ < protected $private = false; 194,195c189 < $this->info_hash = ''; < $this->private = false; --- > $this->info_hash = ''; 204,209d197 < < // Pull private flag from decoded data < if($this->decoded['info']['private'] == 1) < { < $this->private = true; < } 281,282c269 < 'info_hash' => $this->info_hash, < 'private' => $this->private, --- > 'info_hash' => $this->info_hash, 591,600d577 < } < < /** < * Returns a boolean indicating if the torrent is private or not < * < * @return boolean < */ < function getPrivateFlag() < { < return $this->private; 604c581 < ?> --- > ?>
 [2008-06-08 04:35 UTC] tacker (Markus Tacker)
The "pirvate" flag is not defined in the official protocol specification [1] so I see no use in implementing this unless you can provide indepth documentation of this feature. - Who introduced it to the protocol and for what reason? - Why is it not part of the official specification? - Where is written documentation of the "private" flag? [1] http://www.bittorrent.org/beps/bep_0003.html#metainfo-files-are-bencoded-dictionaries-with-the-following-keys
 [2008-06-08 13:14 UTC] wab6 (William Booth)
The official bit torrent specification has been extended on a number of occasions to include missing functionality. In this case, the flag was put in place so you could accurately track a users transfer without peers from DHT distorting the amount of data that has been transferred between known peers. It has also been included so that peers that are not known (by the tracker will not be included in the swarm, in case they are hostile (e.g. on bittorrent sites that track copyright infringing material and example of a hostile peer would be something like a media defender probe). http://wiki.theory.org/BitTorrentSpecification#Info_Dictionary The wiki.theory.org specification is generally better than the official one, with the community updating it when a feature is included on all the major bit torrent clients
 [2008-06-12 04:53 UTC] tacker (Markus Tacker)
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/File_Bittorrent2