| 1 | BEP: 20 |
|---|
| 2 | Title: Peer ID Conventions |
|---|
| 3 | Version: $Revision$ |
|---|
| 4 | Last-Modified: $Date$ |
|---|
| 5 | Author: David Harrison <dave@bittorrent.com> |
|---|
| 6 | Status: Active |
|---|
| 7 | Type: Process |
|---|
| 8 | Created: Feb-27-2008 |
|---|
| 9 | Post-History: |
|---|
| 10 | |
|---|
| 11 | The 20-byte *peer id* field sent in tracker requests and in the peer |
|---|
| 12 | handshake has traditionally been used not only to identify peers but |
|---|
| 13 | also to identify the client implementation and version. |
|---|
| 14 | |
|---|
| 15 | The mainline client sets the first character in the peer-id to ``M`` |
|---|
| 16 | followed by version number represented by ascii digits with major, |
|---|
| 17 | minor and tiny versions separated by dashes. Examples include |
|---|
| 18 | ``M4-3-6--`` or ``M4-20-8-`` for versions 4.3.6 and 4.20.8. The remaining |
|---|
| 19 | bytes in the peer id are random. The following list was originally |
|---|
| 20 | derived from [#theory]_. |
|---|
| 21 | |
|---|
| 22 | A number of clients begin the peer id with a dash followed by two |
|---|
| 23 | characters to identify the client implementation, four ascii digits to |
|---|
| 24 | denote version number, and a dash. As with mainline, the remaining |
|---|
| 25 | bytes are random. An example is ``-AZ2060-``. |
|---|
| 26 | |
|---|
| 27 | Known clients that use this encoding style are |
|---|
| 28 | |
|---|
| 29 | :: |
|---|
| 30 | |
|---|
| 31 | 'AG' - Ares |
|---|
| 32 | 'A~' - Ares |
|---|
| 33 | 'AR' - Arctic |
|---|
| 34 | 'AV' - Avicora |
|---|
| 35 | 'AX' - BitPump |
|---|
| 36 | 'AZ' - Azureus |
|---|
| 37 | 'BB' - BitBuddy |
|---|
| 38 | 'BC' - BitComet |
|---|
| 39 | 'BF' - Bitflu |
|---|
| 40 | 'BG' - BTG (uses Rasterbar libtorrent) |
|---|
| 41 | 'BR' - BitRocket |
|---|
| 42 | 'BS' - BTSlave |
|---|
| 43 | 'BX' - ~Bittorrent X |
|---|
| 44 | 'CD' - Enhanced CTorrent |
|---|
| 45 | 'CT' - CTorrent |
|---|
| 46 | 'DE' - DelugeTorrent |
|---|
| 47 | 'DP' - Propagate Data Client |
|---|
| 48 | 'EB' - EBit |
|---|
| 49 | 'ES' - electric sheep |
|---|
| 50 | 'FT' - FoxTorrent |
|---|
| 51 | 'GS' - GSTorrent |
|---|
| 52 | 'HL' - Halite |
|---|
| 53 | 'HN' - Hydranode |
|---|
| 54 | 'KG' - KGet |
|---|
| 55 | 'KT' - KTorrent |
|---|
| 56 | 'LH' - LH-ABC |
|---|
| 57 | 'LP' - Lphant |
|---|
| 58 | 'LT' - libtorrent |
|---|
| 59 | 'lt' - libTorrent |
|---|
| 60 | 'LW' - LimeWire |
|---|
| 61 | 'MO' - MonoTorrent |
|---|
| 62 | 'MP' - MooPolice |
|---|
| 63 | 'MR' - Miro |
|---|
| 64 | 'MT' - MoonlightTorrent |
|---|
| 65 | 'NX' - Net Transport |
|---|
| 66 | 'PD' - Pando |
|---|
| 67 | 'qB' - qBittorrent |
|---|
| 68 | 'QD' - QQDownload |
|---|
| 69 | 'QT' - Qt 4 Torrent example |
|---|
| 70 | 'RT' - Retriever |
|---|
| 71 | 'S~' - Shareaza alpha/beta |
|---|
| 72 | 'SB' - ~Swiftbit |
|---|
| 73 | 'SS' - SwarmScope |
|---|
| 74 | 'ST' - SymTorrent |
|---|
| 75 | 'st' - sharktorrent |
|---|
| 76 | 'SZ' - Shareaza |
|---|
| 77 | 'TN' - TorrentDotNET |
|---|
| 78 | 'TR' - Transmission |
|---|
| 79 | 'TS' - Torrentstorm |
|---|
| 80 | 'TT' - TuoTu |
|---|
| 81 | 'UL' - uLeecher! |
|---|
| 82 | 'UT' - µTorrent |
|---|
| 83 | 'VG' - Vagaa |
|---|
| 84 | 'WT' - BitLet |
|---|
| 85 | 'WY' - FireTorrent |
|---|
| 86 | 'XL' - Xunlei |
|---|
| 87 | 'XT' - XanTorrent |
|---|
| 88 | 'XX' - Xtorrent |
|---|
| 89 | 'ZT' - ZipTorrent |
|---|
| 90 | |
|---|
| 91 | The following clients have been seen in the wild and need to be identified:: |
|---|
| 92 | |
|---|
| 93 | 'BD' (example: -BD0300-) |
|---|
| 94 | 'NP' (example: -NP0201-) |
|---|
| 95 | 'wF' (example: -wF2200-) |
|---|
| 96 | |
|---|
| 97 | Shad0w with his experimental BitTorrent implementation and BitTornado |
|---|
| 98 | introduced peer ids that begin with a character which is``T`` in the |
|---|
| 99 | case of BitTornado followed by up to five ascii characters for version |
|---|
| 100 | number, padded with dashes if less than 5, followed by ``---``. The |
|---|
| 101 | ascii characters denoting version are limited to the following |
|---|
| 102 | characters:: |
|---|
| 103 | |
|---|
| 104 | 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.- |
|---|
| 105 | |
|---|
| 106 | For example: 'S58B-----'... for Shadow's 5.8.11 |
|---|
| 107 | |
|---|
| 108 | As with other peer id formats, the remanining bytes are random. There |
|---|
| 109 | are significant deviations from this explained here [#shad0w]_. |
|---|
| 110 | |
|---|
| 111 | Known clients that uses this encoding style are:: |
|---|
| 112 | |
|---|
| 113 | 'A' - ABC |
|---|
| 114 | 'O' - Osprey Permaseed |
|---|
| 115 | 'Q' - BTQueue |
|---|
| 116 | 'R' - Tribler |
|---|
| 117 | 'S' - Shadow's client |
|---|
| 118 | 'T' - BitTornado |
|---|
| 119 | 'U' - UPnP NAT Bit Torrent |
|---|
| 120 | |
|---|
| 121 | BitComet produces peer ids that consists of four ASCII characters |
|---|
| 122 | ``exbc``, followed by two bytes *x* and *y*, followed by random |
|---|
| 123 | characters. The version number is *x* in decimal before the decimal |
|---|
| 124 | point and *y* as two decimal digits after the decimal point. BitLord |
|---|
| 125 | uses the same scheme, but adds ``LORD`` after the version bytes. An |
|---|
| 126 | unofficial patch for BitComet once replaced ``exbc`` with ``FUTB``. The |
|---|
| 127 | encoding for BitComet Peer IDs changed to Azureus-style as of BitComet |
|---|
| 128 | version 0.59. |
|---|
| 129 | |
|---|
| 130 | XBT Client has its own style too. Its peer_id consists of the three |
|---|
| 131 | uppercase characters ``XBT`` followed by three ASCII digits representing |
|---|
| 132 | the version number. If the client is a debug build, the seventh byte |
|---|
| 133 | is the lowercase character ``d``, otherwise it is a ``-``. Following that |
|---|
| 134 | is a ``-`` then random digits, uppercase and lowercase letters. Example: |
|---|
| 135 | ``XBT054d-`` at the beginning would indicate a debug build of version |
|---|
| 136 | 0.5.4. |
|---|
| 137 | |
|---|
| 138 | Opera 8 previews and Opera 9.x releases use the following peer_id |
|---|
| 139 | scheme: The first two characters are ``OP`` and the next four digits |
|---|
| 140 | equal the build number. All following characters are random lowercase |
|---|
| 141 | hexdecimal digits. |
|---|
| 142 | |
|---|
| 143 | MLdonkey use the following peer_id scheme: the first characters are |
|---|
| 144 | ``-ML`` followed by a dotted version then a ``-`` followed by |
|---|
| 145 | randomness. e.g. ``-ML2.7.2-kgjjfkd`` |
|---|
| 146 | |
|---|
| 147 | Bits on Wheels uses the pattern ``-BOWxxx-yyyyyyyyyyyy``, where y is |
|---|
| 148 | random (uppercase letters) and x depends on the version. Version 1.0.6 |
|---|
| 149 | has xxx = A0C. |
|---|
| 150 | |
|---|
| 151 | Queen Bee uses Bram``s new style: ``Q1-0-0--`` or ``Q1-10-0-`` followed by |
|---|
| 152 | random bytes. |
|---|
| 153 | |
|---|
| 154 | BitTyrant is an Azureus fork and simply uses ``AZ2500BT`` + random bytes |
|---|
| 155 | as peer ID in its 1.1 version. Note the missing dashes. |
|---|
| 156 | |
|---|
| 157 | TorrenTopia version 1.90 pretends to be or is derived from Mainline |
|---|
| 158 | 3.4.6. Its peer ID starts with ``346------``. |
|---|
| 159 | |
|---|
| 160 | BitSpirit has several modes for its peer ID. In one mode it reads the |
|---|
| 161 | ID of its peer and reconnects using the first eight bytes as a basis |
|---|
| 162 | for its own ID. Its real ID appears to use ``\\0\\3BS`` (C notation) as |
|---|
| 163 | the first four bytes for version 3.x and ``\\0\\2BS`` for version 2.x. In |
|---|
| 164 | all modes the ID may end in ``UDP0``. |
|---|
| 165 | |
|---|
| 166 | Rufus uses its version as decimal ASCII values for the first two |
|---|
| 167 | bytes. The third and fourth bytes are ``RS``. What then follows is the |
|---|
| 168 | nickname of the user and some random bytes. |
|---|
| 169 | |
|---|
| 170 | G3 Torrent starts its peer ID with ``-G3`` and appends up to 9 |
|---|
| 171 | characters of the nickname of the user. |
|---|
| 172 | |
|---|
| 173 | FlashGet uses Azureus style with ``FG`` but without the trailing |
|---|
| 174 | ``-``. Version 1.82.1002 still uses the version digits ``0180``. |
|---|
| 175 | |
|---|
| 176 | AllPeers takes the sha1 hash of a user dependent string and replaces |
|---|
| 177 | the first few characters with "AP" + version string + "-". |
|---|
| 178 | |
|---|
| 179 | |
|---|
| 180 | References |
|---|
| 181 | ========== |
|---|
| 182 | |
|---|
| 183 | .. [#theory] http://wiki.theory.org/BitTorrentSpecification |
|---|
| 184 | |
|---|
| 185 | .. [#shad0w] http://forums.degreez.net/viewtopic.php?t=7070 |
|---|
| 186 | |
|---|
| 187 | |
|---|
| 188 | Copyright |
|---|
| 189 | ========= |
|---|
| 190 | |
|---|
| 191 | This document has been placed in the public domain. |
|---|
| 192 | |
|---|
| 193 | |
|---|
| 194 | .. |
|---|
| 195 | Local Variables: |
|---|
| 196 | mode: indented-text |
|---|
| 197 | indent-tabs-mode: nil |
|---|
| 198 | sentence-end-double-space: t |
|---|
| 199 | fill-column: 70 |
|---|
| 200 | coding: utf-8 |
|---|
| 201 | End: |
|---|