EMule

From Free net encyclopedia

Template:Lowercase Template:Infobox Software

eMule is a peer to peer file sharing application that works with both the eDonkey network and the Kad network. eMule is open source software released under the GNU General Public License. It runs on Microsoft Windows; however, its codebase forms the basis for a Linux client, xMule, and a multiplatform client, aMule.

The distinguishing features of eMule are the direct exchange of sources between client nodes, fast recovery of corrupted downloads, and the use of a credit system to reward frequent uploaders. Furthermore eMule transmits data in Zlib-compressed form to save bandwidth. Another feature of eMule, or any eDonkey network client in general, is the ability to accept 'ed2k' (eDonkey) links from a web browser and begin downloading the file(s) these links refer to. These links ensure that the file being downloaded shares the same hash, and therefore is not a "fake". Many of the sites which provide these links have been taken off-line due to accusations of copyright infringement, as well as the questionable legality of the links they provide. Matching file sources is verified through the use of the MD4 algorithm.

eMule is coded in Visual C++ .NET using the Microsoft Foundation Classes and because it is a popular open-source program, hundreds of eMule mods (modifications of the original eMule) have appeared on the Internet.

Contents

History

The eMule project was started on May 13, 2002 by Hendrik Breitkreuz (a.k.a. Merkur) who was dissatisfied by the original eDonkey2000 client. Over time 7 more developers joined the effort. The source was first released at version 0.02 and published on SourceForge on July 6, 2002. eMule was first released as a binary on August 4, 2002 at version 0.05a. The 'Credit System' was implemented for the first time on September 14, 2002 in version 0.19a. The eMule project website started up on December 8, 2003. Since its inception, eMule has been downloaded over 185 million times (as of March 2006).

Currently the project is staffed by 16 people: 2 developers, 2 project managers (including the founder Breitkreuz), 3 testers and 9 debug testers. The official web site is supported by 7 web developers and 4 moderators [1].

Recent events

Recent versions (v0.40+) of eMule have added support for the Kad Network. This network has an implementation of the Kademlia protocol, which does not rely on central servers as the eDonkey network does.

Also added in recent versions were "Unicode Search" (allowing for searches for files in non-Latin alphabets) and the ability (not supported in Kad Network) to search servers for files with complete sources of unfinished files.

In new versions, a "Bad source list" was added. The application adds an IP address to this list after one unsuccessful connection. After adding an IP to the "Bad source list", the application treats this IP as a "dead" IP. Unavailable IPs are banned for a time period from 15 to 45 minutes. Some users have complained that it leads to a loss of active sources and subsequently slows download speed.

Other recent additions include: the ability to run eMule from a user account with limited privileges (thus enhancing security), and intelligent corruption handling (so that a corrupted chunk, 9.28 MB in size, does not need to be re-downloaded entirely).

The 0.46b version added the creation and management of "collection" files, which contain a set of links to files intended to be downloaded as a set.

eMule is now considered a stable product, and new versions are not released as often as they used to be - 2 to 3 months is now a typical time interval between releases. The latest version, as of February 8, 2006, is version 0.47a.

It is recommended to change the default ports of eMule to higher numbers (for example 20000 instead of 4662), because recently many ISPs are throttling default P2P ports resulting in slow performances.

Official Sites vs Fake Sites

The official website is located at http://www.emule-project.net. The latest version of eMule can always downloaded for free at the official site. You may also download past versions of eMule at http://sourceforge.net/projects/emule

Other similar domain names which ask for payment in order to login or download a purportedly newer version of emule are scam sites, for example:

  • www.emule.org

Basic concepts

File identification

All files are given a hash value that depends on the file's contents, but not its filename. This allows each user to find all sources to a particular file no matter what file name each user has given the file.

Files are broken into "chunks" of 9.28 MB each (the last chunk may be smaller if the file size is not exactly divisible by the chunk size). A file's hash value is computed by first computing the MD4 checksum of each chunk, and then computing the MD4 checksum of the string of those chunks' checksums concatenated with each other.

Identifying other clients

Like the file hash, each user in the network gets a unique and permanent user hash. This user identification is highly secured by a public / private key handshake to prevent misuse.

Downloading data

After determining sources for a file (i.e. other clients who are sharing that file), a client contacts each of those sources to request the file. Each client maintains a "download queue" of other clients who are requesting files for download. Once a client reaches the top of such a queue, the clients contact each other and transfer begins. Clients usually request the chunk that fewest other sources have to aid distribution of the file through the network; otherwise rare chunks may generate a bottleneck. If a client already has most of a chunk, however, it may choose to request the rest of that chunk first because only complete chunks can be shared.

Compression

Before sending data eMule attempts to compress the data with [zlib] set at maximum compression. Then it chooses the smaller set of data to transmit. For already compressed files this is likely to be the raw file, while uncompressed files are likely to result in zlib compressed data to be transmitted.

Classic server based ed2k

Main Article: EDonkey network

Connecting to the network

The key to this network is the eD2k server. Each client must be connected to a server to enter the network. When connecting your client to a server, the server checks to see if other clients can freely connect to your client. If yes, the server assigns your client a so-called high ID. If communication is blocked, the server assigns your client a low ID. After the ID is assigned, eMule will send a list of all shared files to the server. The server adds the filenames and hash values you sent to its database.

Searching for files

Once connected to the network, the client can search for keywords in filenames. A search can either be local or global. If it’s a local search (searches only the server you are connected to), searches are quicker but will have fewer results. If the search is a global search (searches all the servers within the network), it will take longer but have more results. Each server looks up the keyword in its local database and returns any file names (with the hash value) that matches the keyword.

Note that there are fake servers in the network that do not return any results for certain type of searches (e.g. mp3 files)

Finding sources for files

Downloads can be added by eMule’s search function or a special eD2k link format offered on many websites. Once they are in the Download list, eMule first queries the local (connected) server then all other servers in the network for sources to that particular download. The server looks up the file’s hash value in its database and returns the clients it knows for having it. Sources are other clients who have at least downloaded one entire part (9.28 MB) of the file matching the hash.

Kad serverless network

(based on Kademlia protocol)

Connecting to the network

The only thing needed to connect to this network is a "bootstrap", which consists of the IP and port of any eMule client already connected. The client generally finds a bootstrap when it connects to a user that it found through an ed2k server. Once a client is in the network, the client then requests for other clients to determine if it can be contacted freely. This process is very similar to the HighID/LowID check on the servers. If you can be freely contacted, you are assigned an ID (similar to a HighID) and given an open status. If you are not freely contacted, you are given a firewalled status. From version v.44a on, the Kad network supports a Buddy for firewalled users. Buddies are other Kad clients who have status open and work as a relay for connections, that the firewalled user cannot manage.

Searching in Kad

In this network it does not matter what you search for. Be it a search for filenames, for sources of a download or for other users, all work pretty much the same. There are no servers to keep track of clients and the files they share so it has to be done by each participating client in the network – in essence, every client is also a small server. Since every client is identified by a unique hash value, the idea of Kademlia is to associate a certain “responsibility” based on this hash. Each client in the Kad network works as a server for certain keywords or sources. The client's hash determines the specific keywords or sources. So the goal of any kind of search is to find those clients that have the responsibility for the current search topic. This is accomplished by a complex calculation of the possible distance to the target client by asking other clients for the shortest route to it.

Basic rules of communication behavior

eMule and all other clients of the eDonkey network support the network in two basic ways:

1) Users are forced to share files: Shared files larger than 9500 KB are divided and downloaded in parts, so that a recipient starts to share the parts of the file already downloaded even before the download of the whole file is complete. The recipient is forced to share in this way until the download is complete.

2) Users are forced to share their bandwidth, thus increasing the network's data stream: The official version of eMule forces the users to set their maximum download speed to no more than four times their maximum upload speed. This limitation does not apply if the maximum upload speed is set to 10K per second or more.

Although there are many mods of eMule, it is hard to find one that doesn't enforce the second feature, which is a part of official eMule policy. Furthermore, attempting to circumvent the uploading feature can possibly slow a user's download, as he will get worse credits from uploaders. Also, many known "leecher" clients are often banned from the downloading through various means by eMule's mods (banning is not supported in official version).

eMule includes a feature that limits the download and upload speeds, so that they do not exceed the limits set by the user.

eMule versions before 0.47a cannot share files larger than 4189500 KB (441 parts). This was an inherent limitation of the ed2k protocol. With the release of 0.47a, this limit was raised to 256GB, but only for clients supporting it (currently just eMule, mods based on the 0.47 version, and CVS builds of aMule).

Summary

Both networks have totally different concepts for achieving the same: searching for files and finding sources to a file. The main goal of the Kad network is to be independent of servers and improve scalability. Servers can only handle a certain amount of users and should a large server go down the network is severely handicapped. Kad network is self-organising and tunes itself for best possible performance depending on the number of users and their connection qualities. Therefore, it is more resistant to a large-scale network loss. Some servers also limit the number of files that can be shared by any particular user. This limitation doesn't exist in Kad network, therefore this network is more suitable for users that share big collections of files.

eMule mods

As a popular open source program, eMule has many variants, usually called mods. Some mods started as a fork of an eMule code, and then continued to develop independently of the official version. A popular mod of this type is eMule Plus. It does not have Kademlia protocol implemented. Other mods follow official eMule releases, and make their own releases based on each new release of the official version. Often features first debuted in a mod later find their way into the official version. Neomule recently experiments with encryption to bypass ISP throttling. It may be good for users not willing to change their Internet service provider, but it may lead to even stricter bandwidth limiting from the ISPs and there is a chance of upcomming incompatible eMule-mods each implementing their own different version of encryption. This protocol obfuscation cannot lead to privacy or anonymity of course.

Mod links

Some popular mods:

The credit system

Introduction

The credit system is used to reward users contributing to the network, i.e. uploading to other clients.

The strict queue system in eMule is based on the waiting time a user has spent in the queue. The credit system provides a major modifier to this waiting time by taking the upload and download between the two clients into consideration. The more a user uploads to a client the faster he advances in this client's queue.

The modifiers are calculated from the amount of transferred data between the two clients. The values used can be seen in the client's details dialog. To view this information, right click on any user and choose View Details.

Credit calculation

A user's position in other clients' queues depends on various factors, including the time they have been waiting in the queue, the upload priority for the requested file, and the user's credit. These factors are all expressed in an integer value, and their total gives a "score" which is used to rank the users in the queue.

The credit is calculated in the following way:

  • If the client has ever uploaded less than 1 MB, the credit value is 1.
  • If the client has uploaded more than 1 MB, but never downloaded anything, the credit value is 10.
  • Otherwise:
    • Calculate the following value: total uploaded data × 2 / total downloaded data.
    • Calculate the following value: Square root of total uploaded data + 2.
    • Out of those two values, choose the one that is lower. Call it x.
    • If x is less than 1, the credit value is 1. If x is greater than 10, the credit value is 10. Otherwise, the credit value is x.

Notes

  • Credits are not global; they are exchanged between two specific clients.
  • Your own credits are tracked by the client who owes you the credit. This prevents faking the credits.
  • The credit system rewards remote clients for uploading to you, even if their software does not support the credit system.
  • If the remote client does not support the credit system, then you are not rewarded for uploading to them.
  • Credits are stored in the clients.met file. The unique user hash is used to identify the client.
  • It is not possible to view your own credits.
  • There are clients on in the network that uses other credit systems.

Colors of the ProgressBar

Each download in the Transfers tab has a small colored bar to show current file availability and progress.

Basic Styles

Image:Downloadbar flat.png (flat style)

Image:Downloadbar shaded.png (shaded style)

Black shows the parts of the file you already have.

Red indicates a part missing in all known sources.

Different shades of blue represent the availability of this part in the sources. The darker the blue, the more sources have this part.

Yellow denotes a part being downloaded.

The green bar on top shows the total download progress of this file

Image:Downloadbar finished flat.png (flat style)

Image:Downloadbar finished shaded.png(shaded style)

A green bar stands for a completed download.

Image:Downloadbar paused flat.png (flat style)

Image:Downloadbar paused shaded.png (shaded style)

A dark red or blue progress bar denotes a stopped or paused download.

Download Bar

If you expand the download you see each of its sources with their corresponding bar. To see the sources just double-click a download (or single click, depends on the settings in Options -> Display ). Here the colours have a slightly different meaning:

Image:Bar source flat.png (flat style)

Image:Bar source shaded.png (shaded style)

Black indicates parts you already have

Blue are parts you still need for this download

Silver stands for parts this source is also missing

Green parts are currently downloading

Yellow denotes a pending (already requested) part

Source Count

The four values xx/yy+aa (zz) displayed after the progress bar is the source count for this file and shows following information.

• xx - Number of useful sources

• yy - Total number of sources

• + aa - Number of Asked for another file sources (only shown when Advanced Controls is enabled)

• zz - Currently transferring sources excellent

Obtained Parts

This bar appears in the upload queue if supported by the other client. It shows the progress of the file this user is downloading.

Image:Bar obtained.png

Black are parts this user has already completed

Silver ones are parts still missing

Green parts are currently uploading

Yellow denotes a pending (already requested) part

Availability of shared files

Each shared file shows its availability in the form of a bar. The color coding is similar to the one used with the progress bar

Image:Downloadbar shaded.png

Red indicates a part missing in all known sources

Different shades of blue give an idea how well-spread different parts are

Network status

(data for eDonkey network)

  • Number of concurrent users : 3 - 5 million (correct number is unknown since many new servers are faking their number of users. latest users statistics can be found at : Slyck.com).
  • Number of concurrent shared files: ~600 million.

See also

External links

da:EMule de:EMule et:EMule es:EMule eo:EMule fr:EMule it:EMule he:EMule lt:Emule hu:EMule nl:EMule pl:EMule pt:EMule ru:EMule sq:EMule fi:EMule sv:EMule tr:EMule zh:EMule