VeloAuth
完整的 Velocity 身份验证插件,具备智能昵称保护、正版自动登录、安全的离线玩家管理以及可选的内置嵌入式 limbo 功能。
VeloAuth 是什么?
VeloAuth 是一个面向 Velocity 代理的综合身份验证系统,在玩家到达后端服务器之前处理所有玩家的授权。它包含一个仅限回环地址的嵌入式 limbo,同时保持与现有外部 limbo 服务器的完全兼容,并通过智能冲突解决机制保护昵称所有权。
在线测试服务器
想看看 VeloAuth 的实际效果吗?2b2t.pl 正在生产环境中运行该插件——加入服务器以在真实网络中测试正版自动登录、离线注册和昵称保护功能。
主要特性
- ? 智能昵称保护 - 除非已被盗版玩家注册,否则保留正版昵称。
- ⚡ 正版自动登录 - Mojang 账户拥有者在通过会话验证后可跳过密码输入;auth/limbo 透传为可选绕过选项。
- ? 自动昵称变更检测 - 当正版玩家更改其 Mojang 账户名称时,会自动更新数据库记录。
- ?️ 安全离线认证 - BCrypt 密码哈希、防暴力破解保护,以及由数据库强制执行的原子性首次所有者注册。
- ? 可选 Floodgate 支持 - Bedrock 平台和关联的 Floodgate 账户会在解析 Mojang 信息前被检测;只有经 Floodgate 确认的 UUID 才能绕过认证服务器。
- ? 可选内置 Limbo - 使用基于 1.8 版本的内置 limbo,配合经过审查且校验和固定的 ViaVersion 运行时,或者继续使用外部 limbo(如 NanoLimbo)。
- ?️ 强制主机支持 - 玩家通过自定义域名(例如
pvp.server.com)连接,并在认证成功后被正确路由到目标服务器。 - ? 智能命令隐藏 - 在授权活动期间隐藏身份验证命令(
/login、/register);会话过期后重新显示这些命令。 - ? 高性能 - 受限的三层正版缓存(内存 → 数据库 → Mojang/Ashcon API)、虚拟线程(Java 21),且在 Velocity 事件循环上无阻塞。
- ? 可选双因素认证 (TOTP) - 可选的 RFC 6238 第二因素,兼容 Google Authenticator、Authy 和 Aegis。请参阅 2FA.md 获取操作员手册。
- ? 冲突解决 - 智能处理正版/盗版昵称冲突,提供
/vauth conflicts命令。 - ? 管理员与诊断工具 - 健康检查、统计信息以及通过
/vauth report一键生成的脱敏诊断报告(mclo.gs)。 - ?️ 多数据库支持 - MySQL、PostgreSQL、H2 和 SQLite,并配备 HikariCP 连接池。
- ? 17 种语言与 HEX 格式 - 支持 EN, PL, DE, FR, RU, TR, SI, FI, ZH_CN, ZH_HK, JA, HI, VI, KO, TH, ID, PT_BR,完整支持 RGB/HEX 颜色。
- ? LimboAuth 兼容 - 100% 数据库架构兼容性,支持自动、增量的原地迁移。
- ? Discord 警报 - 针对安全异常和解析器故障激增的网络钩子通知,并带有自动重试逻辑。
何时使用 VeloAuth
- 你运行着 Velocity 代理,带有一个或多个后端服务器,并需要在代理层进行身份验证(而非每个后端单独设置)。
- 你同时接受正版和盗版玩家,需要自动且安全的路由——正版玩家跳过
/login,盗版玩家通过 BCrypt 哈希注册的流程进入。 - 你已在使用 LimboAuth 并希望在不丢失数据的情况下迁移——VeloAuth 能够无缝读取并升级相同的数据库架构。
- 你需要高性能 ——正版状态通过三层缓存进行解析,而不会阻塞代理事件循环。
如果你只运行单个后端服务器(Paper/Spigot/Folia)而没有代理,请使用后端侧的身份验证插件。
运行配置文件
在 plugins/veloauth/config.yml 中选择昵称保护的严格程度:
配置 1 — 混合严格模式(默认,推荐)
premium:
check-enabled: true
allow-cracked-on-premium-nicks: false
bypass-auth-server: false
- 你将获得: 正版玩家使用真实的 Mojang UUID 自动登录;盗版玩家通过
/register+ BCrypt 流程;正版昵称严格保留给 Mojang 所有者。 - 你将失去: 尝试使用已注册的 Mojang 用户名加入的盗版客户端将被拒绝(提示“您未登录到您的 Minecraft 账户”)。
- 最适合: 接受两类玩家的公共服务器,其中防止昵称被盗至关重要。
配置 2 — 仅盗版模式
premium:
check-enabled: false
- 你将获得: 零 HTTP 流量发送至 Mojang/Ashcon,为所有玩家生成确定的离线 UUID。
- 你将失去: 所有玩家的正版自动登录功能均被禁用;第一个注册某个昵称的玩家即拥有该昵称。
- 最适合: 私有网络、开发环境或纯离线模式设置。
配置 3 — 宽松混合模式
premium:
check-enabled: true
allow-cracked-on-premium-nicks: true
- 你获得什么: 现有的正版账户保留正版 UUID;破解玩家可注册未被占用的、外观类似正版的用户名。
- 你失去什么: 首次连接的新正版玩家,若未预先注册为正版账户,将永久获得离线 UUID。
- 适用场景: 优先接纳所有玩家且无踢出提示界面的“仅破解”社区。
| 目标 | 推荐配置 |
|---|---|
| 最高安全性,保留正版 UUID | 1 — 混合严格模式 |
| 不调用 Mojang 服务,纯离线网络 | 2 — 仅破解模式 |
| 接受所有连接,不预留昵称 | 3 — 宽松混合模式 |
要求
- Java 21 或更高版本(已在 Temurin 21 上测试)
- Velocity Proxy(3.4.0+ / 3.5.x 系列)
- 数据库:MySQL、PostgreSQL、H2(默认)或 SQLite
- 认证服务器拓扑:
- 外部(默认):NanoLimbo、LOOHP/Limbo、LimboService、PicoLimbo 或类似软件。
- 内置(可选):内置 1.8 回环 Limbo(需要出站 HTTPS 访问 ViaVersion maven 仓库以进行运行时暂存)。
快速设置
1. 安装
- 从 Modrinth 下载最新的
veloauth-X.X.X.jar。 - 将其放入 Velocity 的
plugins/文件夹中。 - 启动并停止 Velocity,以在
plugins/veloauth/中生成配置文件。 - 在
plugins/veloauth/config.yml中配置数据库详情和认证设置。 - 启动 Velocity。
2. Velocity 配置 (velocity.toml)
[servers]
limbo = "127.0.0.1:25566" # 外部 Limbo 服务器(不要包含在尝试列表中!)
lobby = "127.0.0.1:25565" # 主要后端大厅
survival = "127.0.0.1:25567" # 次要后端服务器
try = ["lobby", "survival"] # 已认证玩家的后备后端顺序
[forced-hosts]
# 通过 survival.example.com 加入的玩家将在 Limbo 中进行认证,
# 然后直接路由到 'survival' 而不是 'lobby'。
"survival.example.com" = ["survival"]
3. VeloAuth 配置 (plugins/veloauth/config.yml)
language: en
auth-server:
# 'external'(默认)使用注册的 Limbo 服务器;'embedded' 启动回环 Limbo。
mode: external
server-name: limbo
timeout-seconds: 300
embedded:
port: 0 # 0 = 自动选择回环端口
max-connections: 512
handshake-timeout-seconds: 10
login-timeout-seconds: 15
premium:
check-enabled: true
allow-cracked-on-premium-nicks: false
# 仅当已验证的正版玩家应完全跳过认证服务器时,才设置为 true
bypass-auth-server: false
# 可选的 Floodgate 集成
floodgate:
enabled: false
username-prefix: "."
bypass-auth-server: true
密码复杂度策略(可选)
security:
min-password-length: 8
max-password-length: 72
password-policy:
min-digits: 0 # 例如,1 = 要求至少包含一个数字
min-uppercase: 0 # 例如,1 = 要求至少包含一个大写字母
min-lowercase: 0 # 例如,1 = 要求至少包含一个小写字母
min-special: 0 # 例如,1 = 要求至少包含一个符号
命令与权限
玩家命令
| 命令 | 描述 | 备注 |
|---|---|---|
/register <password> <confirm> |
注册新账户 | 登录后隐藏 |
/login <password> |
登录你的账户 | 在认证/Limbo 状态下可用 |
/logout |
使会话失效并断开连接 | 正常断开;返回时需要重新 /login |
/changepassword <old> <new> |
更新你的账户密码 | 需要处于活跃会话中 |
/2fa setup |
开始 TOTP 身份验证器设置 | 需要处于活跃会话中 |
/2fa verify <code> |
确认 TOTP 设置或提交 2FA 验证码 | 标准 RFC 6238 TOTP |
/2fa disable <code> |
从账户移除 2FA | 需要有效的 TOTP 代码 |
/2fa qr / /2fa status |
显示 2FA 注册状态 | 重新注册说明 |
管理员命令 (veloauth.admin)
| 命令 | 描述 |
|---|---|
/vauth reload |
重新加载配置文件和语言文件 |
/vauth report |
上传脱敏诊断包至 mclo.gs |
/vauth stats |
显示运行时缓存、线程和连接统计信息 |
/vauth conflicts |
列出当前存在的昵称所有权冲突 |
/vauth cache-reset [player] |
清除正版解析器/认证缓存 |
/vauth 2fa-remove <nickname> |
管理员重置 2FA 以进行恢复 |
/unregister <nickname> |
从数据库中删除账户记录 |
LimboAuth 迁移
VeloAuth 支持 100% 自动化的 LimboAuth 架构迁移:
- 停止后端服务器上的 LimboAuth。
- 在你的 Velocity 代理上安装 VeloAuth。
- 在
plugins/veloauth/config.yml中使用相同的数据库凭据进行配置。 - 启动 Velocity。现有账户和
/premium标志将在启动时无缝转换,无需手动重写 UUID。
链接与支持
- 源代码与发行版:GitHub 仓库
- 问题追踪器:GitHub Issues
- 社区与支持:Discord 服务器
- 文档:2FA 指南 | 更新日志
- 许可证:MIT
VeloAuth
Complete Velocity authentication plugin with intelligent nickname protection, premium auto-login, secure offline player management, and optional self-contained embedded limbo.
What is VeloAuth?
VeloAuth is a comprehensive authentication system for Velocity proxy that handles all player authorization before they reach your backend servers. It includes a loopback-only embedded limbo while maintaining full compatibility with existing external limbo servers, all while protecting nickname ownership through intelligent conflict resolution.
Live test server
Want to see VeloAuth in action? 2b2t.pl runs the plugin in production — join the server to test premium auto-login, offline registration and nickname protection on a live network.
Key Features
- ? Intelligent Nickname Protection - Premium nicknames are reserved unless already registered by cracked players.
- ⚡ Premium Auto-Login - Mojang account owners skip password entry after session verification; auth/limbo passthrough is an opt-in bypass.
- ? Automatic Nickname Change Detection - Detects when a premium player renames their Mojang account and updates the database record automatically.
- ?️ Secure Offline Auth - BCrypt password hashing, brute-force protection, and atomic first-owner registration enforced by the database.
- ? Optional Floodgate Support - Bedrock and linked Floodgate accounts are detected before Mojang resolution; only UUIDs confirmed by Floodgate can bypass the auth server.
- ? Optional Self-Contained Limbo - Use the built-in 1.8-base limbo with a reviewed, checksum-pinned ViaVersion runtime, or keep using an external limbo (NanoLimbo, etc.).
- ?️ Forced Hosts Support - Players connect via custom domains (e.g.,
pvp.server.com) and are properly routed to their intended server after authentication. - ? Smart Command Hiding - Authentication commands (
/login,/register) are hidden while authorization is active; expired sessions expose them again. - ? High Performance - Bounded three-layer premium cache (in-memory → DB → Mojang/Ashcon API), virtual threads (Java 21), and zero blocking on Velocity event loops.
- ? Optional 2FA (TOTP) - Opt-in RFC 6238 second factor compatible with Google Authenticator, Authy, Aegis. See 2FA.md for the operator handbook.
- ? Conflict Resolution - Smart handling of premium/cracked nickname conflicts with
/vauth conflicts. - ? Admin & Diagnostic Tools - Health checks, statistics, and 1-click sanitized diagnostic reports via
/vauth report(mclo.gs). - ?️ Multi-Database - MySQL, PostgreSQL, H2, and SQLite with HikariCP connection pooling.
- ? 17 Languages & HEX Formatting - EN, PL, DE, FR, RU, TR, SI, FI, ZH_CN, ZH_HK, JA, HI, VI, KO, TH, ID, PT_BR with full RGB/HEX color support.
- ? LimboAuth Compatible - 100% database schema compatibility with automatic, additive in-place migrations.
- ? Discord Alerts - Webhook notifications for security anomalies and resolver failure spikes with automated retry logic.
When to use VeloAuth
- You run a Velocity proxy with one or more backend servers and need authentication at the proxy layer (not per-backend).
- You accept both premium and cracked players and need automatic, fail-secure routing — premium players skip
/login, cracked players go through BCrypt-hashed registration. - You already use LimboAuth and want to migrate without losing data — VeloAuth reads and upgrades the same schema seamlessly.
- You want high performance — premium status is resolved through a three-layer cache without blocking proxy event loops.
If you only run a single backend server (Paper/Spigot/Folia) without a proxy, use a backend-side auth plugin instead.
Operating Profiles
Choose how strict nickname protection should be in plugins/veloauth/config.yml:
Profile 1 — Mixed strict (default, recommended)
premium:
check-enabled: true
allow-cracked-on-premium-nicks: false
bypass-auth-server: false
- What you get: Premium players auto-login with real Mojang UUIDs; cracked players go through
/register+ BCrypt; premium nicknames are strictly reserved for Mojang owners. - What you lose: Cracked clients trying to join with a registered Mojang username are rejected ("You are not logged into your Minecraft account").
- Best for: Public servers accepting both types of players where nickname theft prevention matters.
Profile 2 — Cracked-only
premium:
check-enabled: false
- What you get: Zero HTTP traffic to Mojang/Ashcon, deterministic offline UUIDs for everyone.
- What you lose: Premium auto-login is disabled for all players; first player to register a nickname owns it.
- Best for: Private networks, dev environments, or pure offline-mode setups.
Profile 3 — Permissive mixed
premium:
check-enabled: true
allow-cracked-on-premium-nicks: true
- What you get: Existing premium accounts retain premium UUIDs; cracked players can register unclaimed premium-looking usernames.
- What you lose: New premium players connecting for the first time receive offline UUIDs permanently if not pre-registered as premium.
- Best for: Cracked-first communities that prioritize admitting all players without kick screens.
| Goal | Recommended Profile |
|---|---|
| Maximum security, premium UUIDs preserved | 1 — Mixed strict |
| No Mojang calls, pure offline network | 2 — Cracked-only |
| Accept all connections, unreserved nicknames | 3 — Permissive mixed |
Requirements
- Java 21 or newer (tested on Temurin 21)
- Velocity Proxy (3.4.0+ / 3.5.x line)
- Database: MySQL, PostgreSQL, H2 (default), or SQLite
- Auth Server Topology:
- External (default): NanoLimbo, LOOHP/Limbo, LimboService, PicoLimbo, or similar.
- Embedded (optional): Built-in 1.8 loopback limbo (requires outbound HTTPS to ViaVersion maven repo for runtime staging).
Quick Setup
1. Installation
- Download the latest
veloauth-X.X.X.jarfrom Modrinth. - Drop it into your Velocity
plugins/folder. - Start and stop Velocity to generate configuration files in
plugins/veloauth/. - Configure database details and auth settings in
plugins/veloauth/config.yml. - Start Velocity.
2. Velocity Configuration (velocity.toml)
[servers]
limbo = "127.0.0.1:25566" # External limbo server (keep out of try list!)
lobby = "127.0.0.1:25565" # Primary backend lobby
survival = "127.0.0.1:25567" # Secondary backend server
try = ["lobby", "survival"] # Fallback backend order for authenticated players
[forced-hosts]
# Players joining via survival.example.com authenticate in limbo,
# then get routed directly to 'survival' instead of 'lobby'.
"survival.example.com" = ["survival"]
3. VeloAuth Configuration (plugins/veloauth/config.yml)
language: en
auth-server:
# 'external' (default) uses registered limbo server; 'embedded' starts loopback limbo.
mode: external
server-name: limbo
timeout-seconds: 300
embedded:
port: 0 # 0 = auto-select loopback port
max-connections: 512
handshake-timeout-seconds: 10
login-timeout-seconds: 15
premium:
check-enabled: true
allow-cracked-on-premium-nicks: false
# Set to true only if verified premium players should skip the auth-server completely
bypass-auth-server: false
# Optional Floodgate integration
floodgate:
enabled: false
username-prefix: "."
bypass-auth-server: true
Password Complexity Policy (Optional)
security:
min-password-length: 8
max-password-length: 72
password-policy:
min-digits: 0 # e.g., 1 = require at least one digit
min-uppercase: 0 # e.g., 1 = require at least one uppercase letter
min-lowercase: 0 # e.g., 1 = require at least one lowercase letter
min-special: 0 # e.g., 1 = require at least one symbol
Commands & Permissions
Player Commands
| Command | Description | Notes |
|---|---|---|
/register <password> <confirm> |
Register a new account | Hidden once logged in |
/login <password> |
Log into your account | Available in auth/limbo |
/logout |
Invalidate session & disconnect | Clean disconnect; requires /login upon return |
/changepassword <old> <new> |
Update your account password | Requires active session |
/2fa setup |
Begin TOTP authenticator setup | Requires active session |
/2fa verify <code> |
Confirm TOTP setup or submit 2FA code | Standard RFC 6238 TOTP |
/2fa disable <code> |
Remove 2FA from account | Requires valid TOTP code |
/2fa qr / /2fa status |
Show 2FA enrollment status | Re-enrollment instructions |
Admin Commands (veloauth.admin)
| Command | Description |
|---|---|
/vauth reload |
Reload configuration & language files |
/vauth report |
Upload sanitized diagnostic bundle to mclo.gs |
/vauth stats |
Show runtime cache, thread, and connection stats |
/vauth conflicts |
List active nickname ownership conflicts |
/vauth cache-reset [player] |
Clear premium resolver/auth caches |
/vauth 2fa-remove <nickname> |
Administrative 2FA reset for recovery |
/unregister <nickname> |
Delete account record from database |
LimboAuth Migration
VeloAuth features 100% automatic LimboAuth schema migration:
- Stop LimboAuth on your backend servers.
- Install VeloAuth on your Velocity proxy.
- Configure
plugins/veloauth/config.ymlwith the same database credentials. - Start Velocity. Existing accounts and
/premiumflags will be converted seamlessly on startup without manual UUID rewrites.
Links & Support
- Source Code & Releases: GitHub Repository
- Issue Tracker: GitHub Issues
- Community & Support: Discord Server
- Documentation: 2FA Guide | Changelog
- License: MIT
下载 VeloAuth
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VeloAuth
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VeloAuth
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VeloAuth
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VeloAuth
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VeloAuth
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VeloAuth
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VeloAuth
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VeloAuth
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 VeloAuth
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
1.6.2 — 2026-10-07
新增
- 根据 Minecraft 客户端语言环境自动检测认证消息的语言(
detect-client-language)。
修复
- 认证提醒现在会根据账户状态显示
/login或/register。 - 在自动后端传输之前强制执行会话过期检查。
- 不再将高级版
UNKNOWN结果缓存为非高级版。 - 当 Mojang API 不可用时,添加了 Minecraft Services 作为回退方案。
hit-ttl-minutes: 0现在可正确禁用高级版缓存查找。- 修复了并发数据库初始化、SQLite 迁移保护以及数据库关闭处理的问题。
安全
- MySQL 默认启用 TLS 并验证服务器身份,除非显式配置了 SSL。
- 从诊断报告中脱敏认证命令参数。
- 更安全地处理长日志行。
更改
- 更新了依赖项和构建工具。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
ExyliaPlugins 的库。
插件
通过对话框或铁砧界面帮助你的 Anthme
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
插件
用于绘制游戏内地图或在浏览器中随探索实时进行地图绘制的实时地图。
评论 0
登录后参与评分
还没有评论,来抢沙发吧