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