root/dotorg/trunk/html/beps/bep_0020.rst

Revision 11031, 6.3 KB (checked in by dave, 21 months ago)

Specify that BEP documents are in the public domain.

Line 
1BEP: 20
2Title: Peer ID Conventions
3Version: $Revision$
4Last-Modified: $Date$
5Author:  David Harrison <dave@bittorrent.com>
6Status:  Active
7Type:    Process
8Created: Feb-27-2008
9Post-History:
10
11The 20-byte *peer id* field sent in tracker requests and in the peer
12handshake has traditionally been used not only to identify peers but
13also to identify the client implementation and version.
14
15The mainline client sets the first character in the peer-id to ``M``
16followed by version number represented by ascii digits with major,
17minor 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
19bytes in the peer id are random.  The following list was originally
20derived from [#theory]_.
21
22A number of clients begin the peer id with a dash followed by two
23characters to identify the client implementation, four ascii digits to
24denote version number, and a dash.  As with mainline, the remaining
25bytes are random.  An example is ``-AZ2060-``.
26
27Known 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
91The 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
97Shad0w with his experimental BitTorrent implementation and BitTornado
98introduced peer ids that begin with a character which is``T`` in the
99case of BitTornado followed by up to five ascii characters for version
100number, padded with dashes if less than 5, followed by ``---``.  The
101ascii characters denoting version are limited to the following
102characters::
103
104  0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-
105
106For example: 'S58B-----'... for Shadow's 5.8.11
107
108As with other peer id formats, the remanining bytes are random.  There
109are significant deviations from this explained here [#shad0w]_.
110
111Known 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
121BitComet produces peer ids that consists of four ASCII characters
122``exbc``, followed by two bytes *x* and *y*, followed by random
123characters. The version number is *x* in decimal before the decimal
124point and *y* as two decimal digits after the decimal point. BitLord
125uses the same scheme, but adds ``LORD`` after the version bytes. An
126unofficial patch for BitComet once replaced ``exbc`` with ``FUTB``. The
127encoding for BitComet Peer IDs changed to Azureus-style as of BitComet
128version 0.59.
129
130XBT Client has its own style too. Its peer_id consists of the three
131uppercase characters ``XBT`` followed by three ASCII digits representing
132the version number. If the client is a debug build, the seventh byte
133is the lowercase character ``d``, otherwise it is a ``-``. Following that
134is a ``-`` then random digits, uppercase and lowercase letters. Example:
135``XBT054d-`` at the beginning would indicate a debug build of version
1360.5.4.
137
138Opera 8 previews and Opera 9.x releases use the following peer_id
139scheme: The first two characters are ``OP`` and the next four digits
140equal the build number. All following characters are random lowercase
141hexdecimal digits.
142
143MLdonkey use the following peer_id scheme: the first characters are
144``-ML`` followed by a dotted version then a ``-`` followed by
145randomness. e.g. ``-ML2.7.2-kgjjfkd``
146
147Bits on Wheels uses the pattern ``-BOWxxx-yyyyyyyyyyyy``, where y is
148random (uppercase letters) and x depends on the version. Version 1.0.6
149has xxx = A0C.
150
151Queen Bee uses Bram``s new style: ``Q1-0-0--`` or ``Q1-10-0-`` followed by
152random bytes.
153
154BitTyrant is an Azureus fork and simply uses ``AZ2500BT`` + random bytes
155as peer ID in its 1.1 version. Note the missing dashes.
156
157TorrenTopia version 1.90 pretends to be or is derived from Mainline
1583.4.6. Its peer ID starts with ``346------``.
159
160BitSpirit has several modes for its peer ID. In one mode it reads the
161ID of its peer and reconnects using the first eight bytes as a basis
162for its own ID. Its real ID appears to use ``\\0\\3BS`` (C notation) as
163the first four bytes for version 3.x and ``\\0\\2BS`` for version 2.x. In
164all modes the ID may end in ``UDP0``.
165
166Rufus uses its version as decimal ASCII values for the first two
167bytes. The third and fourth bytes are ``RS``. What then follows is the
168nickname of the user and some random bytes.
169
170G3 Torrent starts its peer ID with ``-G3`` and appends up to 9
171characters of the nickname of the user.
172
173FlashGet uses Azureus style with ``FG`` but without the trailing
174``-``. Version 1.82.1002 still uses the version digits ``0180``.
175
176AllPeers takes the sha1 hash of a user dependent string and replaces
177the first few characters with "AP" + version string + "-".
178
179
180References
181==========
182
183.. [#theory] http://wiki.theory.org/BitTorrentSpecification
184
185.. [#shad0w] http://forums.degreez.net/viewtopic.php?t=7070
186
187
188Copyright
189=========
190
191This 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:
Note: See TracBrowser for help on using the browser.