# EDonkey network

The eDonkey Network (also known as the eDonkey2000 network or eD2k) is a decentralized, mostly server-based, peer-to-peer file sharing network created in 2000 by US developers Jed McCaleb and Sam Yagan that is best suited to share big files among users, and to provide long term availability of files. Like most sharing networks, it is decentralized, as there is no central hub for the network; also, files are not stored on a central server but are exchanged directly between users based on the peer-to-peer principle.
The server part of the network is proprietary freeware. There are two families of server software for the eD2k network: the original one from MetaMachine, written in C++, closed-source and proprietary, and no longer maintained; and eserver, written in C, also closed-source and proprietary, although available free of charge and for several operating systems and computer architectures. The eserver family is currently in active development and support, and almost all eD2k servers as of 2008 run this server software.
There are many programs that act as the client part of the network. Most notably, eDonkey2000, the original client by MetaMachine, closed-source but freeware, and no longer maintained but very popular in its day; and eMule, a free program for Windows written in Visual C++ and licensed under the GNU GPL.
The original eD2k protocol has been extended by subsequent releases of both eserver and eMule programs, generally working together to decide what new features the eD2k protocol should support. However, the eD2k protocol is not formally documented (especially in its current extended state), and it can be said that in practice the eD2k protocol is what eMule and eserver do together when running, and also how eMule clients communicate among themselves. As eMule is open source, its code is freely available for peer-review of the workings of the protocol. Examples of eD2k protocol extensions are "peer exchange among clients", "protocol obfuscation" and support for files larger than four gigabytes, etc. The other eD2k client programs, given time, generally follow suit adopting these protocol extensions.
eDonkey client programs connect to the network to share files. eDonkey servers act as communication hubs for the clients, allowing users to locate files within the network. Clients and servers are available for Windows, macOS, Linux, and other Unix-like operating systems. By running an eDonkey server program on a machine connected to the Internet, any user can add a server to the network. As the number of servers and their addresses change frequently, client programs update their server lists regularly.

## Features
### Hash identification

Files on the eDonkey network are uniquely identified using MD4 root hash of an MD4 hash list of the file. This treats files with identical content but different names as the same, and files with different contents but same name as different.
Files are divided in full chunks of 9,728,000 bytes (9500 KiB) plus a remainder chunk, and a separate 128-bit MD4 checksum is computed for each. That way, if a transmission error is detected, only one chunk is corrupted instead of the whole file. Furthermore, valid downloaded chunks are available for sharing before the rest of the file is downloaded, speeding up the distribution of large files throughout the network. A file's identification checksum is computed by concatenating the chunks' MD4 checksums in order and hashing the result. In cryptographic terms, the list of MD4 checksums is a hash list, and the file identification checksum is the root hash, also called top hash or master hash.
It is possible for a malicious user to create two different chunks with the same checksum due to MD4 being vulnerable to collision attacks.

### Search

The eDonkey network supports searching of files by name and a number of secondary characteristics such as size, extension, bitrate, etc. The Lugdunum versions of eserver (eDonkey server software) support complex Boolean searches like 'one AND two AND (three OR four) AND ("five four three" OR "two one") NOT seven'.
To ease file searching, some websites list the checksums of sought-after files in the form of an eD2k link. Some of these websites also have lists of active servers for users to update.

## History

In 2004, the eDonkey network overtook FastTrack to become the most widely used file sharing network on the Internet. While figures vary from hour to hour, it is believed, as of mid-2005, to host on average approximately two to three million users sharing 500 million to two billion files via 100 to 200 servers. The network's most popular server was at one time Razorback2, which usually hosted about one million users. Sometime around February 21, 2006, the Razorback2 servers were raided and seized by the Federal Belgian Police. DonkeyServer No1 and DonkeyServer No2 currently combine for over one and a half million users. However, around July 16, 2007, both servers together with several others were shut down after a temporary injunction was issued.
By 2007, BitTorrent had overcome eDonkey network as the most widely used file sharing network on the Internet. In 2009, it was reported that eDonkey is still the second most popular P2P protocol but is rapidly declining.

## Successor protocols

The original eDonkey network relied on central servers run by users willing to donate the necessary bandwidth and processing/disk usage overhead. Such servers could be subject to heavy traffic and, consequently, more vulnerable to attacks.
To overcome this problem, MetaMachine, the developer of the original eDonkey client, developed Overnet as a successor to the eDonkey protocol. The eMule Project also developed a Kademlia network of their own (called Kad) to overcome the reliance on central servers. In addition, eMule includes a pure P2P client source-exchange capability, allowing a client with a ‘High ID’ (i. e., with incoming eD2k connections not blocked by a firewall) to continue downloading (and uploading) files with a high number of sources for days, even after complete disconnection from the original Kad or eD2k servers that handled the original requests. (eMule does not query secondary servers when told to disconnect from the server). This source-exchange capability is designed to reduce the load on servers by two thirds or more for files that have a large number of seeds, or sources (other clients) for the files. The original eDonkey client by MetaMachine does not support source exchanges.

## Legal action
### Legal action against eDonkey 2000

On September 13, 2006, MetaMachine Inc., the developer of the eDonkey2000 client, agreed to pay $30 million to avoid potential copyright infringement lawsuits brought by the RIAA. In accordance with the agreement, eDonkey is to discontinue distribution of their software as well as to take measures to prevent the use of previous copies of their software for file sharing.

### Confiscation of Razorback 2

Razorback2 was a server of the eDonkey network, known for being able to handle 1 million users simultaneously.
On 21 February 2006, several servers (including Razorback2), located in a Belgian datacenter, were confiscated by the Belgian police, and their operator, who lives in Switzerland, was arrested. This was done after a local judge authorized the confiscation at the datacenter in Zaventem near Brussels, after a denouncement of the Motion Picture Association of America (MPAA), in collaboration with the International Federation of the Phonographic Industry.
The MPAA Chairman and CEO Dan Glickman, described this raid as a "major victory":
   This is a major victory in our fight to cut off the supply of illegal materials being circulated on the Internet via peer-to-peer networks. By shaving the illegal traffic of copyrighted works facilitated by Razorback2, we are depleting other illegal networks of their ability to supply Internet pirates with copyrighted works which is a positive step in our international effort to fight piracy.
Besides having Razorback's equipment confiscated and their site shut down, copyright enforcement entities such as MPAA and IFPI have set up several "Razorback2" fake servers online, with the purpose of mimicking the original servers but which yield no useful results, hampering file-sharing traffic. Afterwards, the Swiss anti-piracy tech firm Logistep SA was hired to help further intimidate and prosecute filesharing users.

### eDonkey poisoning

Servers have appeared on the eDonkey network that censor shared content searches and information about files by the type of the file (such as video or MP3) or by keywords. These servers report large numbers of users (up to 1.5 million) connected to them, thus raising the number of users in the network to 10–13 million; however, it is impossible to determine how many people are actually connected to them. Such servers often disseminate advertisements disguised as commonly searched-for music/video files.

## Server software

The main server software used for the eD2k network is known as Lugdunum server. It was created by reverse engineering edonkey protocol and redesigned from scratch. (MetaMachine abandoned development of eD2k server software and revealed the source code to Lugdunum in late 2002, but was never used). Lugdunum has extended the eD2k protocol while maintaining backward compatibility. Lugdunum server software is gratis, but not open source. The stated reason for not opening the source is to prevent the easy creation of fake servers and to prevent attacking the server itself.
In September 2007, a new server software was announced on the eMule web site forums, called satan-edonkey-server. Given the shut down of major eMule servers due to legal action against them just days earlier, the new server was accepted with suspicion. It was feared that the software may transmit information about the clients to unknown third parties. Some trusted eMule developers received the source code of satan-edonkey-server and stated that no spy-code is built in. The satan server software was created by reverse engineering edonkey protocol. The software comes in two versions (C++ and Java). Satan-eDonkey-server software is also gratis.
A Java version of the server side can be found in , which was written in 2012.

## Client software

Numerous clients, including several that are free software, are available for the eDonkey/eDonkey2000 network:
* aMule: a successful fork from lMule, it fully copied the interface and feel of eMule, and now it shares code with eMule project.
* eDonkey2000: an original MetaMachine client, since discontinued
* eMule: a free Windows client, can also be run on Linux (under Wine); numerous mods are also available
* eMule Plus is a free (GPL) Windows client loosely based on eMule, but doesn't have KAD or obfuscation support while adding other features such as automated fake checks and enhanced GUI. eMule Plus has no direct association with the original eMule.
* Hydranode: a free, multi-network, cross-platform, core-GUI-separated client
* iMule: an anonymous eMule using the I2P network
* JMule: a free open source multi platform java client.
* Jubster: a multi-network client for Windows
* lMule (Linux Mule): A very raw eDonkey client based in eMule, targeted to Linux platforms.
* Lphant: an eDonkey and BitTorrent, cross-platform, core-GUI-separated client that runs on the Microsoft .NET and Mono platforms
* eAnt: a successful fork from Lphant with significant improvements made to keep the source code open. Currently inactive.
* MLDonkey: a free, multi-network, cross-platform client
* Morpheus: a file sharing client for Windows
* Pruna (formerly, MediaVAMP): a Korean-language client based on eMule
* Shareaza: a free open source multi-network file-sharing client that supports the Gnutella2 and Gnutella P2P networks, as well the BitTorrent protocol, additionally to eD2k. It allows network-spanning search of content and has web browser integration to operate as a download manager. Supports user profiles, remote file browsing, chat and advanced search filtering.
* xMule (X11 Mule): a fork from lMule. Deviating from copying eMule, it has more controls than lMule but is less user-friendly. Discontinued in January 2009.
* qMule: a multi-protocol, cross-platform client for eDonkey and BitTorrent networks. Based on libed2k, libtorrent-rasterbar and Qt.

## Tools and libraries

* libed2k: Cross platform C++ eDonkey protocol library. Inspired by libtorrent_rasterbar.