VelocityVersionBouncer
一种简单且全自动的方法,根据玩家的游戏版本将其连接到正确的服务器。
VelocityVersionBouncer 是 Velocity proxy 的一个插件,它会根据玩家的协议版本(Minecraft 游戏版本)自动选择最兼容的后端服务器。
? 工作原理
- 每当客户端连接到代理时,插件都会检查所有已注册的服务器并比较它们的协议版本(游戏版本)。
- 默认情况下,将选择第一个匹配的服务器(您可以在配置文件中更改此设置)。
- 配置文件位于插件文件夹中(
plugins/velocityversionbouncer/config.toml)。 - 客户端可以自动路由,也可以基于配置文件中设置的显式路由进行路由。
- 可选功能包括:回退功能以及用于服务器列表 ping 的版本比较。
- 您还可以更改插件的语言(目前支持
en_US、zh_CN和de_DE)。
❓ 您可能有的问题:
- 通过
/server切换服务器时也会触发吗? 不会,版本检查仅在初始连接(从多人服务器列表)或使用回退功能时触发。 - 如果找不到兼容的服务器会发生什么? 客户端将被断开连接,并显示相应的提示/原因。
- 这适用于模组版 Minecraft 服务器吗? 如果您使用像 Ambassador+ProxyCompatibleForge (更多信息) 这样的设置,该插件将根据其协议版本(游戏版本)路由客户端,并检查后端服务器是否接受已安装的模组。
? 安装与 ?️ 要求
- 下载最新稳定版的
.jar文件(此处),或者自行构建(包含 Gradle 文件)。 - 将文件放入服务器的
plugins/文件夹中(仅限代理!),然后重启一次服务器以在plugins/velocityversionbouncer/config.toml生成配置文件。 - 完成配置文件编辑后,再次重启代理,一切应该就能正常工作了。
注意:如果您未运行
Java 25(或更高版本)和Velocity 4.2.1(或更高版本),此插件可能无法正常工作。 - 如果遇到任何问题:请确保您没有使用快照版本(因为这些版本预期不稳定,而且此 README 始终解释的是最新发行版),如果仍有问题,欢迎在该插件的 GitHub 仓库中提交 issue。
兼容性
- VelocityVersionBouncer 专为 Velocity proxy 构建(其他代理或分支可能也能工作,但未获得官方支持)。
- 在
v2.X.X之前,VelocityVersionBouncer 是针对Java 21和Velocity 3.4.0编译的,因此要支持Java 21或Velocity 3.4.0 - 4.2.1,您可能需要将 VelocityVersionBouncer 降级到1.6.0-release或1.6.1-SNAPSHOT。 - 当然,您也可以分叉项目并针对其他版本进行编译。大部分内容应该完全相同。
示例配置:
# 此配置用于确定每当客户端尝试连接到后端服务器(以及可选地丢失连接)时,如何以及在多大程度上对服务器进行协议版本检查
# en_US zh_CN de_DE
language = "en_US"
# 'whitelist' 是一个字符串数组,列出了当客户端尝试连接时要检查其协议版本的服务器名称。
# 留空等同于放入所有已注册的服务器
# 示例:["server1", "server2"]
# 注意:字符串外的空格将被忽略。
whitelist = ["lobby1", "lobby2", "fun-minigame", "devServer", "best-modpack"]
# 'blacklist' 是一个字符串数组,用于在版本比较期间从临时服务器列表中排除某些服务器。
# 首先添加白名单,然后从该临时列表中移除黑名单中包含的所有服务器。
blacklist = ["devServer"]
# 'modded-servers' 是白名单中的一组服务器,它们会在无模组服务器之前被尝试,以确保
# 模组客户端不会进入原版服务器。
modded-servers = ["best-modpack"]
# 如果启用此选项,可确保加入的玩家均匀分布到所有服务器上
# 选项:(不区分大小写)
# "FIRST-MATCH" - 玩家将发送到第一个匹配的服务器
# "BALANCED" - 玩家将均匀分布到所有匹配的服务器上
distribution = "FIRST-MATCH"
# 如果将此选项设置为 'true',您可以通过使用配置中的 try-list ('ping-passthrough')
# 来覆盖 velocity 确定服务器列表 ping 响应的方式
# 相反,当客户端发送服务器 ping 时,它将使用与加入/回退过程中相同的算法来确定匹配的服务器
# 如果在显式路由中也使用 clientbrands,请小心,因为这些不能用于匹配服务器 ping
server-list-ping = false
# 此选项确定在未找到匹配的服务器 ping 响应时是否使用 velocities ping-passthrough
# 如果设置为 true,描述等内容可能会显示,但客户端会显示版本不匹配,
# 否则客户端将显示“无法连接到服务器”
# 如果 'server-list-ping' 设置为 false,此选项也将被忽略
default-to-ping-passthrough = true
# 这定义了多久对所有后端服务器进行一次 ping 以刷新插件 ping 缓存中的信息
# 单位为秒
ping-intervall = 300
如果启用此选项,则每当客户端从服务器被踢出时(无论是在登录期间、通过 /kick 命令,还是其他原因),
它们将被自动重定向(弹回)到另一台服务器,而不是断开连接。如果客户端通过主动离开服务器显式断开连接,则不会进行重定向。
客户端被踢出的服务器将暂时从备用选项中排除。
这可以防止客户端在备用跳转过程中被发送回该服务器,从而避免可能的无限循环。
enable-fallback-bouncing = true
当 'explicit-fallback-server' 中存在有效的服务器名称时,插件将不再搜索新服务器,而是仅尝试指定的服务器。
如果您希望禁用此选项,请留空(当 enable-fallback-bouncing 设置为 false 时,此项也会禁用)。
警告:这将不检查版本是否匹配
explicit-fallback-server = "lobby"
------ 显式路由 ------
语法
vX_X_X - 游戏版本
p000 - 协议版本(每个发布/快照的协议版本号可在以下链接查看:)
cXYZ - 客户端品牌(例如:vanilla、forge、fabric、Geyser(通过 GeyserMC 加入的玩家)、badlion 等)
必须定义游戏版本 (v) 或协议版本 (p),但客户端品牌 (c) 完全是可选的
当未定义客户端品牌时,路由将接受所有使用定义的游戏/协议版本连接的客户端
[explicit-routing]
示例:v1_21_8cFORGE = "lobby-1"
示例:p123 = "lobby-2"
示例:cGeyser = "GeyserMC-server"
VelocityVersionBouncer
A simple and fully automated way to connect players to the correct server based on their game version.
VelocityVersionBouncer is a plugin for the Velocity proxy that automatically selects the most compatible backend server for a connecting player, based on their protocol version (Minecraft game version).
? How It Works
- Every time a client connects to your proxy the plugin will check all the registered servers and compare their protocol versions (game versions).
- By default, the first server that matches will be selected (you can change that in the config).
- There is a config file located in the plugins folder (
plugins/velocityversionbouncer/config.toml). - The clients can be routed automatically or based on the explicit routings set in the config.
- Optional features include: a fallback functionality as well as comparing versions for server list pings.
- You can also change the plugin's language (currently
en_US,zh_CNandde_DEare available).
❓ Questions you may have:
- Is this also triggered when changing servers via
/server? No, the version checking is only triggered when connecting initially (from the multiplayer server list) or when using the fallback functionality. - What happens if no compatible server is found? The client will simply be disconnected with the according note/reason.
- Does this work with modded Minecraft servers? If you're using setups like Ambassador+ProxyCompatibleForge (more information) this plugin will route the client based on their protocol version (game version) and also checks whether the installed mods are accepted by the backend servers.
? Installation & ?️ Requirements
- Download the
.jarfile of the last stable release (here) or build it yourself (the Gradle files are included). - Put the file in your server's
plugins/folder (only the proxy!) and restart the server once to generate the config file atplugins/velocityversionbouncer/config.toml. - When you're finished editing the config restart the proxy once more and everything should be working.
Note: This plugin may not work properly if you are not running on
Java 25(or higher) andVelocity 4.2.1(or higher). - If you're having problems: make sure you're not using a snapshot (as these are expected to be unstable and this README is always explaining the latest release anyway), if there's still a problem feel free to open an issue on the plugin's GitHub repository.
Compatibility
- VelocityVersionBouncer is built for the Velocity proxy (other proxies or forks may work, but they are not officially supported).
- Before
v2.X.XVelocityVersionBouncer was compiled againstJava 21andVelocity 3.4.0, so to supportJava 21orVelocity 3.4.0 - 4.2.1you may need to downgrade VelocityVersionBouncer to1.6.0-releaseor1.6.1-SNAPSHOT. - You can of course also fork the project and compile against other versions. Most parts should work exactly the same.
Example Config:
# This config is used to determine how and if servers are checked for their protocol versions whenever a client tries to connect to a backend server (and optionally if they lost connection)
# en_US zh_CN de_DE
language = "en_US"
# 'whitelist' is a string array of server names to check for their protocol version when a client tries to connect.
# leaving this empty is equal to putting all registered servers in
# Example: ["server1", "server2"]
# Note: spaces outside the strings will be ignored.
whitelist = ["lobby1", "lobby2", "fun-minigame", "devServer", "best-modpack"]
# 'blacklist' is an array of strings to exclude from the temporary list of servers during version comparison.
# first the whitelist is added and then all servers contained in the blacklist are removed from that temporary list.
blacklist = ["devServer"]
# 'modded-servers' is an array of servers from the whitelist, which are tried before the unmodded servers to ensure,
# that modded clients don't end up on vanilla servers.
modded-servers = ["best-modpack"]
# If enabled this option ensures that joining players will be distributed evenly over all servers
# Options: (case-insensitive)
# "FIRST-MATCH" - players will be sent to the first matching server
# "BALANCED" - players will be evenly distributed over all matching servers
distribution = "FIRST-MATCH"
# This option if set to 'true' lets you override verlocity's way of determining the server list ping response by using the try-list of the config ('ping-passthrough')
# instead when a client sends a server ping it will use the same algorithm to determine a matching server as in the joining/fallback process
# be carefully when also using clientbrands in the explicit routings as these can't be used to match server pings
server-list-ping = false
# This option determines wether to use velocities ping-passthrough when no matching server was found for the ping response
# If set to true, things like the description will probably show but the client shows that the version doesn't match,
# otherwise the client will display "Can't connect to server"
# This option will also be ignored if 'server-list-ping' is set to false
default-to-ping-passthrough = true
# This defines how often all backend servers get pinged to refresh infos in the plugins ping cache
# in seconds
ping-intervall = 300
# If enabled this option ensures that whenever a client is kicked from a server (whether during login, via /kick, or for another reason),
# they will be automatically redirected (bounced) to another server instead of being disconnected. If a client disconnects explicitly via leaving the server they will not be redirected.
# The server the client was kicked from will be temporarily excluded from the fallback options.
# This prevents the client from being sent back there during fallback-bouncing and therefore also preventing a possible infinite loop.
enable-fallback-bouncing = true
# When there is a valid server name in 'explicit-fallback-server' the plugin won't search for a new server and instead only tries the specified server.
# Leave this empty, if you'd like to disable this option (also this is disabled when enable-fallback-bouncing is set to false).
# WARNING: this will not check whether the versions match or not
explicit-fallback-server = "lobby"
# ------ explicit routing ------
# Syntax
# vX_X_X - game version
# p000 - protocol version (Protocol version numbers for every release/snapshot can be found here: https://minecraft.wiki/w/Minecraft_Wiki:Projects/wiki.vg_merge/Protocol_version_numbers)
# cXYZ - Client brand (for example: vanilla, forge, fabric, Geyser (for player joining through GeyserMC), badlion, etc.
# either a game version (v) or a protocol version (p) is necessary but client brands (c) are completely optional
# when no client brand is defined the routing just takes every client joining with the defined game/protocol version
[explicit-routing]
# Example: v1_21_8cFORGE = "lobby-1"
# Example: p123 = "lobby-2"
# Example: cGeyser = "GeyserMC-server"
下载 VelocityVersionBouncer
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VelocityVersionBouncer
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VelocityVersionBouncer
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VelocityVersionBouncer
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VelocityVersionBouncer
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VelocityVersionBouncer
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VelocityVersionBouncer
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VelocityVersionBouncer
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VelocityVersionBouncer
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VelocityVersionBouncer
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
新增支持检查模组服务器是否接受客户端(使客户端在多个服务器间跳转,直到找到一个接受它的服务器)。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
ExyliaPlugins 的库。
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
一个在游戏内运行的 Minecraft 地图编辑器! 支持选区、蓝图、复制粘贴、笔刷和脚本。 可在创造模式中使用,也可在生存模式中临时使用。
插件
创建用户友好的菜单以前往不同的世界
插件
专为 Velocity 打造的自制聊天插件,功能丰富——支持跨服群组/全局/私聊消息,并集成 LibertyBans 的禁言功能。
插件
一个高度兼容、功能完善且稳定的 TPA 模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧