[bittorrent] Problems connecting with tracker

Brian Dessent brian at dessent.net
Mon Mar 6 17:53:11 EST 2006


Brett Cooper wrote:

> http://torrent.centos.org:6969/announce?info_hash=3d7f02fc1af6a7f9143a6991f6288d1d936b137d?peer_id=-BT1000-387261336287?port=6881?uploaded=0?downloaded=0?left=2147483709?event=started
> But, instead of getting a peer list back, I get (depending on the
> torrent):
> d14:failure reason63:Requested download is not authorized for use with this tracker.e
> or
> d14:failure reason40:this tracker is for torrents on TPB onlye

You're not encoding the parameters correctly.  It looks like you're
sending just straight hexadecimal, but that's incorrect.  Take the raw
20 byte binary hash value and then urlencode that.  You should end up
with %nn replacing any byte that is outside of the printable ascii
range.  Check RFC1738 or
<http://www.blooberry.com/indexdot/html/topics/urlencoding.htm>.  The
same applies for peer_id as well, but that is of less importance since
most clients pick values that all lie in the printable range so normally
no urlencoding is needed there.

Brian



More information about the BitTorrent mailing list