Client ID of BTQueue

According to unknown client ID problem posted in forum, I think it is the time to explain how BTQueue work in more detail. This post aims to let you know how BTQueue generates its client ID to report to tracker. Since I would like to know which version and release are popular in the wild, so I embedded both version and release to the client ID. Basically, a client ID is a fixed length string at 20 characters in size. For BTQueue, it consists of 4 parts.

  • The client identity - 1 character - constant "Q"
  • Version - 3 characters - each component of version number is converted to base64 and padded by dash "-". For example, 0.1.1 is represented as "011--".
  • Padding - 2 characters - 2 dashes "--".
  • Unique ID - 3 characters - This is a local unique number for this running.
  • Release - 3 characters - The release number is converted to base64 for each 6 bits by 3 times. In other words, the release number is separated to 3 numbers by 6 bits. Each number then is converted to base64.
  • Random ID - 8 characters - Random characters. All characters must be existed in base64 lookup table.

For example, BTQueue 0.1.1 447 should have client ID like Q011--ebb06-T61jNm6J, Q011--f5806-H3UpjvrQ, and so on. The important part is "Q", "011", and "06-".

Technorati Tags: , , , , ,

Post new comment