[bittorrent] Problems connecting with tracker

Brett Cooper bac15 at uakron.edu
Thu Mar 9 21:38:33 EST 2006


Brian Dessent wrote:

>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
>_______________________________________________
>BitTorrent mailing list
>BitTorrent at lists.ibiblio.org
>http://lists.ibiblio.org/mailman/listinfo/bittorrent
>  
>
Brian,
    I was experimenting with what you suggested in your email.  I guess
I am a bit confused as what to send to the tracker.  I guess it is not
clearly defined at: http://wiki.theory.org/BitTorrentSpecification (and
there are no examples).  Now I know there is a 20 byte SHA1 hash value
for the value of the info key.  For example,
"84E6B5AA9F68477BE346BA762DE1A6C84CAED4EE".  Now I believe for a url
that would be fine, no special characters that need urlencoded.  When
you say take the raw 20 byte binary hash value, I literally interpret
that as converting each character in:
"84E6B5AA9F68477BE346BA762DE1A6C84CAED4EE" into binary code.  Then, I am
suppose to send the binary code to the tracker or the string
representation of that binary code or the hex code or?  When you say
"raw" do you mean the byte array's hex equivalent, their integer values,
character values? What and how are you suppose to initially send to the
tracker?  It isn't making sense right now and any direction would be
helpful.  If you could provide an example, I think it would greatly
clarify things.  Thanks for the help.

    - Brett



More information about the BitTorrent mailing list