eD2k & Kademlia

本文介绍了eD2K和Kademlia网络。eD2K网络有自然和“强制”限制,依赖服务器运行,文件分块传输;Kademlia是无服务器网络,让每个用户充当服务器,但处于测试阶段,不支持防火墙客户端。两者各有优劣,eD2K用户多,Kademlia有潜力。

F.A.Q. on eD2k-Kademlia

Are there any limitations on the ED2K network?

Not much, but yes, there are: two natural limits and a "forced" limitation. The two natural limits have already been mentioned before. First, the issues on LowID users (their transfers involve data through the server and two LowID clients can't share between them). The second, although ED2K is a p2p protocol, it needs servers to establish the p2p connection. This latter one is solved in the Kademlia protocol.
About the "forced" limitation, it's only a limit to make sure that clients share so that the ED2K network will not disappear: clients which have an upload limit of X KBps, where X is between 0 and 3.99 (both included) can download at a maximum of X*3 KBps. Clients which have an upload limit of Y KBps, where Y is Between 4 and 9.99 (both included) can download at a maximum of Y*4 KBps. Clients with an upload limit of 10KBps or more have no downloading limitations. This restriction is set in the client application so it could be by-passed by hacking the code, but that would probably result in being banned from the servers you connect to.
Also, any client is forced to allow at least three upload slots, so it's not possible to allow more than upload_limit/3 KBps per slot.
There is one last limit: Network file limit is 4GB.
Additionally, this is not an eD2k limitation but a server limitation, servers will only send 300 results for your searches, so don't expect any more results.

2.1. The eD2K Network

As I stated earlier, the eD2K Network began with eDonkey2000. Now there are many clients that use this Network. The Network is run by many different servers, not just one like a lot of other P2P networks. To connect to a server you must first get a server list for your client, we will see this later. When you connect to a server, the server tests to see if other clients can connect to you. If they can connect to you, you will receive a High ID, if they cannot, you will receive a LowID. We will read more about ID later. Once you have connected, your list of shared files will be sent to the server, the server will then add this list of files to the database. The servers do a lot of work including performing searches and gathering sources. Without these servers the Network would be useless and even one of these big servers falling could be fatal to the Network. Files are transferred in chunks, or Parts. Anybody who has downloaded a full part of a file is known as a source. A part of a file is 9.28MB. This Part system means that big files can be spread easily around the Network. We will read later how you can use this to your advantage to achieve higher download speeds.

2.2. The Kademlia Network

Whereas the eD2K Network requires you to connect to servers, Kademlia is a serverless network. Well, it's serverless to the degree that you wont have to download a massive server list and keep it up to date to use it. Kademlia, sort of, makes a server out of every user. When you connect to the Kademlia Network, you are given an ID if you have a HighID. To connect to the network you require the IP of an eMule client already connected to it. A test like the HighID test in the eD2K Network is then performed, if other clients can connect to you, you will be given an Open status. If they cannot connect to you, you will be given a Firewalled status. If you have a Firewalled status, you will be required to connect to a server because Kademlia doesn't support Firewalled clients yet, as it is still in it's testing phase. As a client on the Kademlia Network, you are assigned a responsibility. Each client has a unique Hash ID and your responsibility might be to handle searches for a specific keyword. Then when another client searches the Network, the clients responsible for the keywords are found and the search results can be brought back. This is a pretty clever idea and it makes use of every client connected to the network.

2.3. eD2K Vs. Kademlia

So which network is better than the other?? That is the question you probably would ask first. The answer is.. neither is better. In fact, the only difference between the Networks is how you connect and how source finding and searches are performed. The files on each network are not completely different at all. One however might have more users than the other making the amount of files higher. However, there are some differences between them that have to be noted. Firstly, eD2K depends on Servers to work. If the biggest server collapses the Network potentially could be crippled until more servers come to facilitate. Kademlia however, doesn't depend on major servers but to work properly would depend on a high client count. eMule now is the only client that supports Kademlia also, whereas many many clients support eD2K which means eD2K will probably for a very long time have far more users than Kademlia. Basically, each has it's good and bad points, neither Network is perfect and lets not forget, Kademlia is still just in it's early stages. I, for one, am looking forward to it's future.

### 如何使用 eD2k 协议进行文件下载 eD2k(Electron Donkey 2000)是一种用于 P2P 文件共享的协议,广泛应用于各种文件共享软件中。以下是关于如何利用该协议进行文件下载的支持工具及其具体使用方法。 #### 工具推荐 一种常用的工具是 **eMule**,这是一款专门为 Edonkey2000 网络设计的高效下载器[^1]。除了支持 eD2k 协议外,它还兼容 Kademlia 网络,能够提供更广泛的资源共享能力[^2]。此外,还有其他类似的工具如 Shareaza,也支持 eD2k 协议以及更多类型的 P2P 协议[^3]。 #### 安装与配置 要开始使用 eMule 或类似工具,请按照以下说明操作: 1. 访问官方或可信站点下载安装包。例如,可以从项目地址 `https://gitcode.com/open-source-toolkit/b76a0` 获取最新版本的 eMule 软件。 2. 完成安装后启动程序,在首次运行时会提示设置基本参数,比如上传/下载带宽限制、存储路径等。 #### 添加 ED2K 链接 当您获得了一个有效的 ED2K 链接之后,可以通过如下方式将其加入到您的客户端队列当中: - 打开已安装好的 eMule 应用界面; - 寻找菜单栏中的选项 “链接” 或者快捷键 Ctrl+L ,弹出输入框; - 将完整的 ED2K URL 复制粘贴进去确认即可自动解析并创建相应的任务条目。 #### 开始传输过程 一旦成功添加了目标资源的任务记录,则只需等待连接建立完成便可正式进入数据交换阶段。期间可能涉及到寻找可用源节点的过程,因此建议耐心等候一段时间直到有足够的伙伴参与进来为止。 ```python # 示例 Python 脚本展示如何调用外部命令行工具处理ED2K链接 (仅作演示用途) import subprocess def add_ed2k_link(link): try: result = subprocess.run(['emule', '--add-link', link], capture_output=True, text=True) if 'success' in result.stdout.lower(): print(f"Successfully added {link}") else: raise Exception("Failed to add the provided ED2K link.") except FileNotFoundError as fnf_error: print("Ensure that Emule CLI is installed and accessible via PATH.", str(fnf_error)) example_ed2k_url = "ed2k://|file|ExampleFile.mp4|123456789|ABCDEF1234567890|/" add_ed2k_link(example_ed2k_url) ``` 上述脚本仅为理论上的实现概念,并假设存在名为 `emule` 的可执行文件接受特定参数来导入新的ED2K链接。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值