这是一个跨平台的 Minecraft P2P 网络多玩家库,使用高性能套接字实现出色的转发性能,具有 P2P 功能。
A cross-platform Minecraft P2P online multi-player library in C#, developed using high-performance sockets for excellent forwarding performance, with P2P powered by the Zerotier SDK.
Proudly powered by another of our open-source projects: Hive.Framework
| Function | Status |
|---|---|
Server: Log Room Ops Info to local DB |
:white_check_mark: |
Server: Client/Room management |
:white_check_mark: |
Server: Relay Server management |
:white_check_mark: |
Relay: Relay Server impl based on Hive |
:white_check_mark: |
Relay: Ultra low latency relay impl |
:white_check_mark: |
Client: ZT based P2P connection |
:white_check_mark: |
Client: ConnectX based Relay connection |
:white_check_mark: |
| Dual Stack Socket Support | :white_check_mark: |
ConnectX.Client.Relay is the standalone server-relay client and has no ZeroTier dependency.ConnectX.Client.ZeroTier is the optional direct/P2P implementation. It references the relay client for shared client behavior and is the only client project that references ZeroTier.Sockets.We are using the MSDI(Microsoft.Extensions.DependencyInjection) as our DI container. The best practice is to use .NET Generic Host for you program.
First, add the following method for the Server Config. ConnectXServerIp will be the Backend address for the ConnectX.Server.
…Then, just add one more line to complete the setup!
private static void ConfigureServices(IServiceCollection services)
{
// ...
+ services.UseConnectXRelay(_ => GetConnectXSettings());
// ...
}Applications that intentionally support direct connections should reference
ConnectX.Client.ZeroTier and call UseConnectXZeroTier instead.
Inject IServerLinkHolder and Client into the VM where you want to manage the room instances.
await _serverLinkHolder.ConnectAsync(CancellationToken.None);[!IMPORTANT]
Please make sure that before you perform any room operations, you need to make sure you already connected to the ConnectX server!await TaskHelper.WaitUntilAsync(() => _serverLinkHolder is { IsConnected: true, IsSignedIn: true });
…MIT. This means that you can modify or use our code for any purpose, however, copyright notice and permission notice shall be included in all copies or substantial portions of your software.
ConnectX is not affiliated with Mojang or any part of its software.
This project, ConnectX, is licensed under the MIT License.
ConnectX uses ZeroTier, which is licensed under the Apache License 2.0 as of 2025-01-01, following its license change from BSL 1.1. You can find more about ZeroTier's licensing at https://github.com/zerotier/ZeroTierOne.
Here, we'll list all programs using our code without obeying the MIT License.
暂无开放 Issues,或尚未同步最近议题。