Velocity Hybrid Auth
Velocity Hybrid Auth 为 Velocity 提供了一个本地的 Yggdrasil hasJoined 桥接服务。
它实现了严格的流程:
尝试 Mojang 会话验证。
如果 Mojang 验证成功,则接受并标记为 MOJANG。
如果 Mojang 验证失败,检查该用户名是否存在于 Mojang。
如果该用户名存在于 Mojang,则拒绝且不再尝试 Ely.by。
如果该用户名不是 Mojang 用户名,则尝试 Ely.by 会话验证。
接受有效的 Ely.by 会话;拒绝其他所有情况。
没有 /login、/register 命令,也没有盗版用户名回退机制。
工作原理
Velocity 通常会在在线模式加密握手期间直接调用 Mojang。
此插件启动了一个本地端点:
Velocity 必须调用该端点而不是直接联系 Mojang。桥接服务会先尝试连接 Mojang,保护属于 Mojang 的用户名,最后再使用相同的 serverId 尝试 Ely.by。
必需的 Velocity 启动参数
为了获得最可靠的设置,请在 -jar velocity.jar 之前添加以下 JVM 参数:
-Dmojang.sessionserver=
示例:
java -Dmojang.sessionserver= -Xms128M -Xmx2048M -jar velocity.jar
插件也会在启动时尝试设置此属性,但使用 JVM 参数是更可靠的方法,因为 Velocity 从内部静态字段读取此值。
Velocity 配置
推荐配置:
online-mode = true
player-info-forwarding-mode = "modern"
forwarding-secret-file = "forwarding.secret"
此处设置 online-mode = true 是可以的,因为 Velocity 仍在执行真实的在线模式握手;本地桥接服务决定会话是来自 Mojang 还是 Ely.by。
如果你保持 online-mode = false,请在插件配置中保留 bridge.force-online-mode-in-pre-login=true,以便每次登录都强制通过在线握手流程。
Paper 后端配置
每个 Paper 后端应使用:
online-mode=false
在 config/paper-global.yml 中:
proxies:
velocity:
enabled: true
secret: "same-secret-as-forwarding.secret"
online-mode: true
必须对后端进行防火墙隔离,以防止玩家直接连接。
日志
桥接服务记录以下操作标签:
ACCEPT_MOJANG
ACCEPT_ELYBY
DENY_MOJANG_NAME_PROTECTED
DENY_NO_VALID_SESSION
DENY_AUTH_SERVICE_UNAVAILABLE
DENY_INVALID_USERNAME
Velocity Hybrid Auth
Velocity Hybrid Auth provides a local Yggdrasil hasJoined bridge for Velocity.
It implements the strict flow:
Try Mojang session verification.
If Mojang succeeds, accept as MOJANG.
If Mojang fails, check whether the username exists on Mojang.
If the Mojang username exists, deny and never try Ely.by.
If the username is not a Mojang username, try Ely.by session verification.
Accept valid Ely.by sessions; deny everything else.
There is no /login, no /register, and no cracked username fallback.
How It Works
Velocity normally calls Mojang directly during the online-mode encryption handshake.
This plugin starts a local endpoint:
Velocity must call that endpoint instead of Mojang. The bridge then tries Mojang first, protects Mojang-owned names, and finally tries Ely.by with the same serverId.
Required Velocity Launch Flag
For the most reliable setup, add this JVM flag before -jar velocity.jar:
-Dmojang.sessionserver=
Example:
java -Dmojang.sessionserver= -Xms128M -Xmx2048M -jar velocity.jar
The plugin also tries to set this property at startup, but the JVM flag is the reliable method because Velocity reads this value from an internal static field.
Velocity Config
Recommended:
online-mode = true
player-info-forwarding-mode = "modern"
forwarding-secret-file = "forwarding.secret"
online-mode = true is fine here because Velocity is still doing a real online-mode handshake; the local bridge decides whether the session is Mojang or Ely.by.
If you keep online-mode = false, leave bridge.force-online-mode-in-pre-login=true in the plugin config so every login is forced through the online handshake.
Paper Backend Config
Each Paper backend should use:
online-mode=false
In config/paper-global.yml:
proxies:
velocity:
enabled: true
secret: "same-secret-as-forwarding.secret"
online-mode: true
Backends must be firewalled so players cannot connect directly.
Logs
The bridge logs these action labels:
ACCEPT_MOJANG
ACCEPT_ELYBY
DENY_MOJANG_NAME_PROTECTED
DENY_NO_VALID_SESSION
DENY_AUTH_SERVICE_UNAVAILABLE
DENY_INVALID_USERNAME
评论 0
登录后参与评分
还没有评论,来抢沙发吧