NeoVelocity
NeoVelocity 为运行在 Velocity 代理 后方的 NeoForge 服务器启用**现代转发(Modern Forwarding)**支持。
如果没有此模组,位于代理后的 NeoForge 服务器通常会发现所有玩家都从 127.0.0.1 连接,或者无法正确验证 UUID/皮肤。本模组实现了 Velocity 的原生转发协议,确保 IP 地址、UUID 和游戏资料能正确传递给服务器。
功能特性
- 现代转发: 完全支持 Velocity 的安全转发协议。
- 自动重载: 配置更改(如更新密钥)立即生效,无需重启服务器。
- Sinytra/Fabric 兼容性: 自动检测
fabric_networking_api_v1。如果您正在运行 Forgified Fabric API 并遇到登录断连问题,本模组包含一种解决方法(请参阅配置文件中的login-custom-packet-catchall)。
安装指南
-
安装模组 将 jar 文件放入服务器的
mods文件夹中。 -
服务器属性 您不需要在
server.properties中将online-mode=false,因为本模组会直接挂钩到登录流程。但是,如果您遇到身份验证循环,将其设置为false是安全的,因为代理负责处理认证。 -
首次运行 启动服务器一次以生成位于
config/neovelocity-common.toml的配置文件。 -
配置密钥 找到您 Velocity 代理 根目录下的
forwarding.secret文件。复制其内容并将其粘贴到 NeoForge 服务器上的config/neovelocity-common.toml中。- 选项 A: 直接将字符串粘贴到配置文件中。
- 选项 B: 让配置文件指向包含密钥的文件路径。
配置与兼容性
大型整合包(Velocity 配置)
Velocity 默认限制已知数据包的数量为 64 个。如果您的整合包超过此限制,玩家将被断开连接,且您的 Velocity 控制台将显示 QuietDecoderException: too many known packs。
要解决此问题,请在您的 Velocity 代理 启动参数中添加以下标志,并将数值设置为高于 64 的值:
-Dvelocity.max-known-packs=64 # 增加此值(尝试 128 或更高)
模组兼容性(“捕获全部”设置)
默认情况下,NeoVelocity 假设所有自定义登录数据包都是 Velocity 的身份验证尝试。
然而,Fabric Networking API 允许模组发送自己的自定义登录数据包。为了让这些模组正常工作,您必须在配置中将 login-custom-packet-catchall = false。
工作原理:
当设置为 false 时,NeoVelocity 会先检查数据包的签名。
- 如果密钥匹配: NeoVelocity 会接管该数据包并处理登录。
- 如果密钥不匹配: 数据包将被忽略并传递给其他模组。
警告: 如果在此设置保持 false 的情况下您的转发密钥不正确,NeoVelocity 将会忽略 Velocity 的数据包。服务器会将其视为未知的垃圾数据,并在日志中以 “检测到不兼容的模组” 错误断开您的连接。
安全警告
不要将您的 NeoForge 服务器端口直接暴露在互联网上。 您必须配置防火墙(iptables/UFW),使其仅接受来自 Velocity 代理 IP 地址的连接。如果后端端口开放,恶意用户可能会通过知晓转发密钥来绕过身份验证。
故障排除
如果玩家在登录期间被踢出,请检查断开连接的消息并与下文进行比较。
-
"NeoVelocity configuration error. Check server logs." 模组已安装,但您尚未配置密钥。
- 解决方法: 打开
config/neovelocity-common.toml并粘贴您的forwarding.secret。
- 解决方法: 打开
-
"Unable to verify proxy data integrity." Velocity 代理中的密钥与 NeoForge 服务器配置中的密钥不匹配。
- 解决方法: 再次从代理复制
forwarding.secret的内容,并确保粘贴到 NeoVelocity 配置时没有多余的空格。
- 解决方法: 再次从代理复制
-
"This server requires you to connect via a Velocity Proxy using Modern Forwarding." 服务器未收到任何转发数据。
- 原因 A: 您正尝试直接连接到后端服务器端口。您必须通过代理 IP/端口连接。
- 原因 B: 您的 Velocity
velocity.toml设置为player-info-forwarding-mode = "none"或"legacy"。您必须将其设置为"modern"。
-
"Incompatible mod detected during login handshake." 另一个模组(通常是 Fabric Networking API)修改了登录数据包,导致签名检查失败。
- 解决方法: 打开
config/neovelocity-common.toml并将login-custom-packet-catchall = false。
- 解决方法: 打开
更多文档
有关设置代理、配置防火墙和调整网络设置的详细指导,请参阅官方 Velocity 文档。
贡献
源代码可在 GitHub 上获取。如果发现错误或希望建议支持其他代理协议,欢迎提交 Issue 或 Pull Request。
NeoVelocity
NeoVelocity enables Modern Forwarding support for NeoForge servers running behind a Velocity proxy.
Without this mod, NeoForge servers behind a proxy often see all players connecting from 127.0.0.1 or fail to validate UUIDs/Skins correctly. This mod implements Velocity's native forwarding protocol to ensure IP addresses, UUIDs, and game profiles are passed correctly to the server.
Features
- Modern Forwarding: Full support for Velocity's secure forwarding protocol.
- Auto-Reload: Configuration changes (like updating the secret) apply immediately without restarting the server.
- Sinytra/Fabric Compatibility: Automatically detects
fabric_networking_api_v1. If you are running Forgified Fabric API and experience login disconnects, the mod includes a workaround (seelogin-custom-packet-catchallin the config).
Installation
-
Install the Mod Drop the jar file into your server's
modsfolder. -
Server Properties You do not need to set
online-mode=falseinserver.properties, as this mod hooks into the login process directly. However, if you run into authentication loops, setting it tofalseis safe since the proxy handles auth. -
First Run Start the server once to generate the configuration file at
config/neovelocity-common.toml. -
Configure the Secret Locate the
forwarding.secretfile in your Velocity proxy's root directory. Copy the content and paste it intoconfig/neovelocity-common.tomlon your NeoForge server.- Option A: Paste the string directly into the config.
- Option B: Point the config to a file path containing the secret.
Configuration & Compatibility
Large Modpacks (Velocity Config)
Velocity limits the number of known packs to 64 by default. If your modpack exceeds this limit, players will be disconnected, and your Velocity console will show QuietDecoderException: too many known packs.
To fix this, add the following flag to your Velocity Proxy's startup arguments and set the number higher than 64:
-Dvelocity.max-known-packs=64 # Increase this value (try 128 or higher)
Mod Compatibility (The "Catch-All" Setting)
By default, NeoVelocity assumes all custom login packets are Velocity authentication attempts.
However, the Fabric Networking API allows mods to send their own custom login packets. To allow these mods to work, you must set login-custom-packet-catchall = false in the configuration.
How it works:
When set to false, NeoVelocity checks the packet's signature first.
- If the secret matches: NeoVelocity claims the packet and handles the login.
- If the secret does NOT match: The packet is ignored and passed to other mods.
Warning: If your forwarding secret is incorrect while this setting is false, NeoVelocity will ignore the Velocity packet. The server will treat it as unknown garbage data and disconnect you with an "Incompatible mod detected" error in the logs.
Security Warning
Do not expose your NeoForge server port directly to the internet. You must configure your firewall (iptables/UFW) to only accept connections from your Velocity Proxy's IP address. If the backend port is open, a malicious user could bypass authentication by knowing the forwarding secret.
Troubleshooting
If players are kicked during login, check the disconnect message and compare it below.
-
"NeoVelocity configuration error. Check server logs." The mod is installed, but you haven't configured the secret yet.
- Fix: Open
config/neovelocity-common.tomland paste yourforwarding.secret.
- Fix: Open
-
"Unable to verify proxy data integrity." The secret in your Velocity proxy does not match the secret in your NeoForge server config.
- Fix: Copy the content of
forwarding.secretfrom your proxy again and ensure there are no extra spaces when pasting it into the NeoVelocity config.
- Fix: Copy the content of
-
"This server requires you to connect via a Velocity Proxy using Modern Forwarding." The server did not receive any forwarding data.
- Cause A: You are trying to connect to the backend server port directly. You must connect through the Proxy IP/Port.
- Cause B: Your Velocity
velocity.tomlis set toplayer-info-forwarding-mode = "none"or"legacy". You must set it to"modern".
-
"Incompatible mod detected during login handshake." Another mod (usually Fabric Networking API) has modified the login packet, causing the signature check to fail.
- Fix: Open
config/neovelocity-common.tomland setlogin-custom-packet-catchall = false.
- Fix: Open
Further Documentation
For detailed guidance on setting up your proxy, configuring firewalls, and tuning network settings, please refer to the official Velocity Documentation.
Contributing
Source code is available on GitHub. If you find a bug or want to suggest support for other proxy protocols, feel free to open an issue or submit a Pull Request.
下载 NeoVelocity
下载 NeoVelocity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 NeoVelocity
下载 NeoVelocity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 NeoVelocity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 NeoVelocity
下载 NeoVelocity
下载 NeoVelocity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 NeoVelocity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 NeoVelocity
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
- 新增对 1.21.6、1.21.7 和 1.21.8 的支持
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧