[bittorrent] Azureus DHT

Adrian Ulrich torrent at blinkenlights.ch
Tue Dec 12 16:23:14 EST 2006


Hi Stas,

> In general, are there any kind of documentation for Azureus DHT,
> PeerExchange and other protocol extensions?

http://www.azureuswiki.com/index.php/Main_Page has some (little)
information it.

Whireshark (Ethereal) does also understand Azureus extensions.

AFAIK the whole thing works like this:

#1: Both clients do a BT-Handshake
#2: If both clients set Extensions-Bit #1 (..thanks a bunch) they'll start
    doing an AZ_HANDSHAKE that looks like this:

    Total-Message length (4bytes)
    Message-Type length (4 bytes)
    Message type (string)
    Priority (1 byte)
    Bencoded Dict (string: total_len-4-type_len-1)

    -> supported extensions are promoted
       via the bencoded part (eg. messages->AZ_PEER_EXCHANGE)

Use wireshark yourself and you'll get an idea how it works.

PeerExchange should be easy to implement.
Azureus DHT shouldn't be a big problem either (Kademlia based)

The most annoying part is that you are supposed to talk
'Azureus-Style-BT' after doing an AZ_HANDSHAKE.

To be honest: I wouldn't bother implementing Azureus-Extensions:
http://www.rasterbar.com/products/libtorrent/extension_protocol.html
has been implemented by many clients (ut_pex) and mainline-dht does
also work fine.

Regards,
 Adrian



More information about the BitTorrent mailing list