eMule协议说明书(翻译一)

1 Introduction
1.1 Purpose and scope
eMule is a popular file sharing application which is based on the eDonkey protocol. This
report describes the network behavior of eMule and explains the basic terminology that is
needed to understand the protocol. The report also gives a full specification of the eMule network
protocol including an appendix which provides the message formats. The information
in this document is based on an open source eMule client [2]. The purpose of the following
introduction is to provide general background that will allow the reader to to read and
understand this document. An extensive information source about eMule is found in [3].

1绪论

1.1用途和范围

eMule是一款流行的建立在eDonkey 协议基础之上的文件共享应用程序.这份报告描述了eMule的网络行为,和为了理解协议的基础性的术语.这份报告也提供了一份详细的eMule网络协议,包括在附录中提供了消息的格式.在这个文档中的信息是建立在一个开源的eMule客户端的基础之上的[2].接下来来的绪论是为了提供一个背景知识,好让读者去阅读和理解这份文档.更多的关于eMule的消息来源也找到了[3].

1.2 Overview
The eMule network is populated with several hundreds of eMule servers and millions of eMule
clients [1]. Clients should connect one server for getting network services, the server connection
stays open as long as the client is in the system. The servers are performing centralized
indexing services (like in Napster) and do not communicate with other servers.

1.2概论

eMule在好几百的eMule 服务器和数百万的eMule 客户端间是非常流行的[1].客户端需连接到一个服务器当中获得网络服务,只要客户端在服务器的系统中,服务器就一直保持打开状态.服务器执行的是集中索引服务,而且并不会与其它的服务器端通信.

Each eMule client is pre-configured with a list of servers and a list of shared files on its
local file system. A client uses a single TCP connection to an eMule server for logging into
the network, getting information about desired files and available clients. The eMule client
also uses several hundreds of TCP connections to other clients which are used to upload and
download files. Each eMule client maintains an upload queue for each of his shared files.
Downloading clients join the queue at its bottom and advance gradually until they reach
the top of the queue and begin downloading his file. A client may download the same file
from several other eMule clients, getting different fragments from each on. A client may
also upload chunks of a file which it has not yet completed downloading. Finally, eMule
extends the eDonkey capabilities and allows clients to exchange information about servers,
other clients and files. Note that both client and server communication is TCP based.

每一个eMule客户端早就用一列服务器名和一列共享文档在本地的文件系统配置好了.一个客户端发送一个TCP连接到eMule服务器中来进行网络注册,获得自己想要的文件和可利用的其它客户端.eMule 客户端也发送好几百的TCP连接到其它的客户端上去,这些客户端正在上载和下载文件.每一个eMule客户端都为它的每一个共享文件维持着一个上载队列.要下载这个文件的客户端都需要加入这个队列的尾部,并逐渐想前移直到达到队列的头部才开始下载它的文件.一个客户端可以从其它eMule 客户端中下载同一个文件,从每一个客户端中下载不同的片.客户端也可以在没有完全下载完的时候上载该文件块.eMule扩展了eDonkey 的能力,而且客户端间可以交换关于服务器名,其它客户端和文件的信息.注意,客户端和服务器端的通信是以TCP为基础.

 The server employs an internal database in which it stores information about clients and files.
An eMule server doesn’t store any files, it acts as a centralized index for storing information
about the location of files. An additional function of the server, which is becoming deprecated,
is to bridge between clients that connect through a firewall and are not able to accept incoming
connections. The bridging functionality increases considerably the server load. eMule employs
UDP to enhance the client’s capabilities against both the server and other clients. The
client’s ability to send and receive UDP messages is not mandatory for the client’s correct
daily operation and it would function flawlessly when a firewall prevents it from sending and
receiving UDP messages.

服务器在内部有一个数据库,在这个数据库里保存了关于客户端和文件的信息。一个eMule服务器是不会保存任何文件的,它只是为保存了关于文件位置的信息提供一个索引。服务器中有一个附加的功能现在开始遭到质疑了,这个功能在客户端与客户端通过防火墙通信中起着桥梁作用,而且不能接受内部连接。这个起着桥梁作用的功能给服务器增加了相当的负担.eMule 使用  UDP 来增强一个客户的使用能力,但是削弱了服务器和别的客户的使用能力。这个客户收发UDP消息的能力对于客户端正确的日常操作来说并不是强制性的,并且当防火墙阻止它收发UDP消息时也可以无误的运行.

1.2.1 Client to server connection
Upon startup the client connects using TCP to a single eMule server. The server provides the
client with a client ID (section 1.3) which is valid only through the client-server connection’s

                                   Figure 1.1: eMule high level network diagram

1.2.1客户端对服务器端的连接

在客户端使用TCP连接到一个eMule 服务器启动之前.这服务器为这客户端提供一个客户端ID(1.3节)

life time (note that when the client has high ID it will receive the same ID from all servers
until its IP address changes). Following the connection establishment the client sends the
server his list of shared files. The server stores the list in its internal database which usually
contains several hundred thousand of available files and active clients. The eMule client also
sends his download list which contains the files that it wishes to download. Section 2 provides
a detailed description of the eMule client and server TCP message exchange.

这个客户端ID只在客户端与服务器端连接的生命期中才有效(注意当这客户端具有一个高ID时,它将从其它所有服务器中接收到相同的ID直到它的IP地址改了).随着连接的建立,客户端向这服务器端发送它所共享的文件列表。服务器端把这个列表保存进内部的数据库中,这数据库通常包含了许多可用的文件和活动着的客户.eMule客户端也发送一下载列表,这列表中包含了它所希望下载的文件.段落2为eMule客户端和服务器端的TCP消息的交换提供了详细的描述。

After the connection is established, the eMule server sends the client a list of other clients that
posses files which the connecting client wishes to download (these clients are called ’sources’).
From this point on, the eMule client begins to establish connections with other clients as
described in section 1.2.2 below.

当连接已经建立后,eMule服务器向客户端发送一份有关其他客户端的列表,列表里面的其他客户端有通信客户端想要下载的文件(这些客户端称为信息源).从这时候开始,eMule客户端就象下面的1.2.2节介绍的那样开始与其它的客户端建立连接.

Note that the client/server TCP connection is kept open during all the client’s session. After
the initial handshake transactions are triggered mainly by user activity: From time to time,
the client sends file search requests which are replied by a search results, a search transaction
is usually followed by a query for sources for a specific file, this query is replied with a list of
sources (IP and port) from which the requester can download the file from.

注意客户端/服务器端的TCP连接在客户的会话期间会一直保持打开状态.在首次握手事物触发之后:有时,这客户端发送一个文件搜索请求,这一请求将以搜索的结果为答复,一个搜索事务常常向信息源询问一个特殊的文件,询问者将得到一个信息源的列表,这客户端都可以从列表中所包含的客户端处下载到该文件。

UDP is used for communication with servers other than the server to which the client is
currently connected. The purpose of UDP messages is file search enhancement, source search
enhancement and finally, keep-alive (make sure that all the eMule servers in the client’s
server list are valid). More details about client-server UDP message exchange can be found
in chapter 3.

UDP用来服务器与服务器的通信,这是不同于通常的客户端的连接。UDP消息的目的是为了提高文件的搜索能力、信息源的搜索、保持活动状态(必须确保客户端的服务器列表中的服务器还处于有效状态).在第3章将会看到更多的关于客户端-服务器用UDP交换信息的内容.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值