forked from UNIX_IO/ed2kNET
ED2K .NET Server (F#)
|
|
||
|---|---|---|
| doc | ||
| .gitignore | ||
| build.sh | ||
| Config.fs | ||
| config.json | ||
| CryptoAES.fs | ||
| ed2k.fs | ||
| ed2kClient.fs | ||
| ed2kNET.code-workspace | ||
| ed2kNET.fsproj | ||
| ed2kSearch.fs | ||
| ed2kServer.fs | ||
| EncryptionTCP.fs | ||
| FileRegister.fs | ||
| global.json | ||
| Interfaces.fs | ||
| LICENSE | ||
| ObfuscationTCP.fs | ||
| ObfuscationUDP.fs | ||
| package.sh | ||
| Program.fs | ||
| RC4.fs | ||
| README.md | ||
| Test.fs | ||
| Utility.fs | ||
ed2kNET
ed2kNET is an implementation of the eDonkey2000 (ed2k) protocol written in F#. The project includes both server and client protocol specifications and allows for the operation of a basic ed2k server.
Features
- ed2k Server Protocol: Implementation of core functionalities for an eDonkey server.
- Search Functionality: Support for ed2k search queries with various filters (filename, size, type, etc.).
- Client Interaction: Basic support for client handshakes and reachability checks.
- Ed2K Obfuscation: Includes implementations for RC4 and protocol obfuscation.
- Configurable: Simple configuration via a
config.jsonfile. - Testing IPv6 Support: Client's may connect to both IPv6 or IPv4 stack
- AES256-GCM encryption: Server supports both AES and legacy obfuscation
TODOs
- UDP Obfuscation
- Managing clients / timed out clients
- Managing files / resources
- LowID <=> HighID eServer callback
Prerequisites
- .NET 9.0 SDK or newer.
- F# (installed with the .NET SDK).
Installation & Execution
- Clone or download the repository.
- Navigate to the project directory.
- Restore dependencies:
dotnet restore - Build the project:
dotnet build - Start the server:
dotnet run
Configuration
The server settings can be adjusted in the config.json file:
{
"ServerConfig": {
"ListenAddress": "192.168.171.2",
"ListenPort": 16244,
"Ipv6Enable": false,
"Ipv6ListenAddress": "::",
"Ipv6ListenPort": 16244,
"MaxFiles": 6000000,
"MaxClients": 60000
}
}
ListenAddress: The IPv4 address the server listens on.ListenPort: The port for TCP/UDP connections.MaxFiles/MaxClients: Limits for server operation.
Project Structure
Program.fs: Entry point and main server logic.ed2k.fs: Core protocol specifications and opcodes.ed2kServer.fs: Logic for server responses and message formats.ed2kClient.fs: Client-relevant communication.ed2kSearch.fs: Implementation of search logic.Config.fs: Configuration loader.RC4.fs/Obfuscation.fs: Security-related functions.Utility.fs: Helper functions for byte manipulation and calculations.
License
This project is licensed under the GPLv3 license. For more information, see the LICENSE file.
Author
Copyright (C) 2019-2025 georg@bege.email See Telegram channel: HydraP2P / https://t.me/+krHfzWREKcc3NjVi