OpenZiti MC
无需开放防火墙端口,即可与好友共享 Java 版服务器。OpenZiti MC 通过 OpenZiti 零信任覆盖网络路由游戏的网络流量。这意味着专用服务器不需要公网 IP、公共 DNS 名称或开放的 TCP 端口。只需通过 OpenZiti 服务名称进行连接。在数据包到达服务器之前,OpenZiti 覆盖网络将先对任何连接进行身份验证和授权。
功能说明
- 客户端: 当你在“添加服务器”中输入 OpenZiti 服务名称时,模组会拦截 Netty 拨号过程,并通过覆盖网络而非 TCP 进行连接。
- 服务端: 在配置中启用后,专用/集成服务器将绑定到 OpenZiti 服务,而不是普通的 TCP 监听器。只有覆盖网络上经过授权的标识符才能访问它。
工作原理
整个模组由三个 Mixin 组成,它们钩住 Netty 的 Bootstrap/ServerBootstrap 调用,并替换为 ZitiChannelFactory + ZitiAddress.Dial / ZitiAddress.Bind。Minecraft 的数据包处理管线未被触碰。OpenZiti JVM SDK 已打包在 jar 文件中,因此无需额外安装。标识符从 config/openziti/identity.json 中的标准 OpenZiti 标识符文件加载。放入你的文件即可完成设置。
要求
- Java Edition 1.20.1
- Fabric Loader 0.16.10+
- Fabric API
- Architectury API
- 一个正在运行的 OpenZiti 控制器和一个至少一个边缘路由器。如果你没有 OpenZiti 覆盖网络,请按照入门指南进行设置。
OpenZiti 设置
仓库中包含一个 setup-ziti.ps1 脚本,它可以交互式地完成所有操作,是设置 OpenZiti 覆盖网络的推荐方式。
- 创建一个服务(默认为
openziti-mc) - 创建一个标记为
#minecraft-server的标识符用于专用服务器,以及一个或多个标记为#minecraft-clients的标识符用于每个玩家 - 创建匹配的 Bind/Dial 服务策略
服务器设置
确保服务器标识符已注册,并将注册的服务器 .json 文件放入 config/openziti/identity.json,然后在 config/openziti.json 文件中设置 "serverBind": { "enabled": true, "serviceName": "openziti-mc" }。
客户端设置
对于运行 OpenZiti MC 模组的每个客户端,确保客户端标识符已注册,然后将注册的客户端标识符放入 config/openziti/identity.json。
使用模组
启动 Minecraft 后,选择:多人游戏 -> 添加服务器 -> 服务器地址 openziti-mc -> 完成 -> 加入。
其他信息
如需更多信息或更多细节,请参阅 GitHub 上的项目主页 。在那里你会发现一份完整的逐步指南(控制器 + 标识符 + 策略 + 开发运行),也在 SETUP.md 中提供。
限制
- 此版本仅针对 MC 1.20.1。NeoForge 支持计划在未来的 MC 更新中提供。
- OpenZiti SDK 和 Kotlin 标准库已打包,因此 jar 文件大小约为 28 MB。比大多数实用模组大,但比大多数内容模组小。
- 关于 Netty 映射目标的注解处理器警告是表面现象;它们不影响运行时行为。
架构
如需技术深入探讨(Netty 通道工厂钩子、 smuggler InetSocketAddress 模式、三个 Mixin 类、ZitiContext 预热等待、拨号重试循环),请参阅仓库中的 BLOG.md。
致谢
- openziti/ziti -- OpenZiti 覆盖网络
- openziti/ziti-sdk-jvm -- SDK,其
ziti-netty模块使这个模组变得小巧而非庞大。 - vgskye/e4mc-minecraft-architectury -- smuggler-InetSocketAddress 模式和
Connection/ServerConnectionListener的 Mixin 结构。
采用 Apache-2.0 许可证。源代码位于 github.com/dovholuknf/openziti-mc。
OpenZiti MC
Share a Java Edition server with friends without opening firewall holes. OpenZiti MC routes the game's network traffic over an OpenZiti zero-trust overlay. This means the dedicated server never needs a public IP, a public DNS name, or an open TCP port. Connect by OpenZiti service name. The OpenZiti overlay network will then authenticate and authorize any connections to your server before a packet ever reaches it.
What it does
- Client side: when you type an OpenZiti service name into "Add Server", the mod intercepts the Netty dial and connects over the overlay instead of TCP.
- Server side: when enabled in config, the dedicated/integrated server binds on an OpenZiti service instead of a normal TCP listener. Only authorized identities on the overlay can reach it.
Why it works the way it does
The whole mod is three Mixins hooking Netty's Bootstrap/ServerBootstrap calls and swapping in ZitiChannelFactory
ZitiAddress.Dial/ZitiAddress.Bind. Minecraft's packet pipeline is untouched. The OpenZiti JVM SDK is bundled in the jar, so no extra installs. Identities are loaded from a standard OpenZiti identity file inconfig/openziti/identity.json. Drop yours in, you are done.
Requirements
- Java Edition 1.20.1
- Fabric Loader 0.16.10+
- Fabric API
- Architectury API
- A running OpenZiti controller and at least one edge router. If you don't have an OpenZiti overlay, set one up by following a get-started guide.
OpenZiti Setup
The repo includes a setup-ziti.ps1 script that does all of this interactively and is the recommended way to set up
the OpenZiti overlay.
- create a service (
openziti-mcby default) - one identity tagged
#minecraft-serverfor the dedicated server, plus one or more identities tagged#minecraft-clientsfor each player - create the matching Bind/Dial service policies
Server Setup
Ensure the server identity is enrolled and drop the enrolled server .json into config/openziti/identity.json, then
set "serverBind": { "enabled": true, "serviceName": "openziti-mc" } in the config/openziti.json file.
Client Setup
For each client running the OpenZiti MC mod, ensure the client identity is enrolled and then drop the enrolled client
identity into config/openziti/identity.json.
Using the Mod
After starting Minecraft, choose: Multiplayer -> Add Server -> Server Address openziti-mc -> Done -> Join.
Additional Information
For additional information or more details see the project's main page on GitHub at . There you'll find a full step-by-step (controller + identities + policies + dev runs) guide as well in the SETUP.md.
Limitations
- This release targets MC 1.20.1 only. NeoForge support is planned for a future MC bump.
- The OpenZiti SDK and Kotlin standard library are bundled, so the jar is around 28 MB. Larger than most utility mods, smaller than most content mods.
- Annotation-processor warnings about Netty mapping targets are cosmetic; they do not affect runtime behavior.
Architecture
For a technical deep-dive (Netty channel-factory hook, the smuggler InetSocketAddress pattern, the three Mixin classes, the ZitiContext warmup wait, the dial-retry loop) see
BLOG.md in the repo.
Credits
- openziti/ziti -- the OpenZiti overlay network
- openziti/ziti-sdk-jvm -- the SDK whose
ziti-nettymodule made this a small mod instead of a large one. - vgskye/e4mc-minecraft-architectury -- the smuggler-InetSocketAddress pattern and the Mixin shapes for
Connection/ServerConnectionListener.
Apache-2.0 licensed. Source at github.com/dovholuknf/openziti-mc.
下载 OpenZiti MC
下载 OpenZiti MC
下载 OpenZiti MC
下载 OpenZiti MC
下载 OpenZiti MC
下载 OpenZiti MC
下载 OpenZiti MC
下载 OpenZiti MC
下载 OpenZiti MC
下载 OpenZiti MC
发布版本 0.4.1。有关设置、配置和安装步骤,请参阅 和 。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧