
Auth
Auth 是一个面向 Minecraft 网络的代理优先认证系统。它使用一个适用于 Velocity/BungeeCord 的代理插件,以及用于 Spigot/Paper/Purpur/Folia 服务器的轻量级后端守卫插件。
玩家通过 /login 或 /register 在代理上进行认证,而后端服务器则在代理确认玩家已登录后才受到保护。
需要安装附加组件 - 链接
功能
| 功能 |
状态 |
| Velocity 支持 |
是 |
| BungeeCord 支持 |
是 |
| Spigot 后端守卫 |
是 |
| Paper/Purpur 后端守卫 |
是 |
| Folia 后端守卫 |
是 |
| SQLite 数据库 |
是 |
| MySQL / MariaDB / PostgreSQL |
是 |
/login 和 /register |
是 |
| 会话登录 |
是 |
| Authenticator 双重验证 (2FA) |
是 |
管理员 /zauth 命令 |
是 |
| 后端移动/聊天/命令保护 |
是 |
| 后端物品栏/掉落/伤害保护 |
是 |
| 更新时配置自动合并 |
是 |
| bStats 支持 |
是 |
下载
Auth 构建多个 jar 文件。请为每种服务器类型安装正确的 jar 文件。
| Jar 文件 |
安装位置 |
Auth-Proxy-<version>.jar |
Velocity 或 BungeeCord 代理 |
Auth-Backend-SpigotLegacy-<version>.jar |
Spigot 风格 1.16-1.19 后端服务器 |
Auth-Backend-Spigot-<version>.jar |
Spigot 风格 1.20-1.21 后端服务器 |
Auth-Backend-Paper-<version>.jar |
Paper/Purpur 1.21+ 后端服务器 |
Auth-Backend-Folia-<version>.jar |
Folia 1.21+ 后端服务器 |
不要将代理 jar 安装到后端服务器上。
不要将后端 jar 安装到代理上。
工作原理
- 玩家加入代理服务器。
- Auth 检查该玩家是否已注册。
- 玩家进行登录、注册或验证双重认证(2FA)。
- 代理将认证状态发送给后端服务器。
- 在后端服务器确认登录之前,会阻止玩家进行游戏操作。
后端与代理通过以下频道自动通信:
zcraftauth:state
无需配置后端数据库。
命令
| 命令 |
描述 |
/login <password> |
登录你的账号 |
/l <password> |
登录快捷命令 |
/register <password> <password> |
注册新账号 |
/reg <password> <password> |
注册快捷命令 |
/logout |
登出并重新锁定后端访问 |
/changepass <old> <new> |
修改密码 |
/2fa enable |
生成身份验证器密钥 |
/2fa verify <code> |
验证你的两步登录 |
/2fa disable <code> |
禁用身份验证器两步验证 |
管理员命令
使用 /zauth 需要以下权限:
zcraftauth.admin
| 命令 |
描述 |
/zauth status |
显示已认证玩家数量 |
/zauth unregister <player> |
删除玩家的登录记录 |
/zauth setpassword <player> <password> |
更改玩家密码 |
/zauth disable2fa <player> |
移除玩家的 2FA(双重验证) |
/zauth forcelogin <player> |
将玩家标记为已登录 |
/zauth logout <player> |
将玩家标记为已登出 |
数据库支持
Auth 支持以下数据库:
- SQLite
- MySQL
- MariaDB
- PostgreSQL
默认配置:
database:
type: sqlite
sqlite:
file: auth.db
外部数据库示例:
database:
type: mysql
external:
host: localhost
port: 3306
database: zcraft_auth
username: root
password: ""
ssl: false
会话登录
当玩家的 IP 地址与上次已知登录 IP 匹配时,Auth 可以恢复玩家的会话。
session:
enabled: true
这有助于在保护后端服务器免受攻击的同时,避免不必要的重新登录。
超时设置
登录和注册的超时时间是分开的。
general:
login-timeout: 0
register-timeout: 0
将任一值设置为 0 即可禁用该超时功能。
后端保护
后端插件故意设计得小巧且影响极小。它不连接数据库,也不运行重复任务。
它可以阻止以下行为:
- 移动
- 聊天
- 命令
- 物品栏点击
- 物品掉落
- 拾取物品
- 受到伤害
- 攻击他人
后端配置:
block-movement: true
allow-chat: false
enable-bypass-permission: false
allowed-commands:
- "/login"
- "/register"
- "/l"
- "/reg"
- "/2fa"
- "/totp"
- "/authenticator"
操作员(Operators)默认不会被豁免。
2FA 身份验证器
玩家可以启用基于身份验证器的 2FA:
/2fa enable
在后续登录时,输入正确密码后,他们必须验证:
/2fa verify <code>
兼容常见的身份验证器应用,如 Google Authenticator、Authy、2FAS 以及类似的 TOTP 应用。
性能
Auth 旨在保持对后端服务器的轻量级影响:
- 后端插件没有数据库连接。
- 后端插件不对密码进行哈希处理。
- 后端插件不执行账户查找。
- 后端插件仅监听保护事件和代理状态。
- 代理端的数据库操作是异步运行的。
- 提示条由事件驱动。
这使得后端 TPS/MSPT 的影响降至最低。
尚未移植的功能
较旧的仅 Paper 代码库包含更多计划中或遗留的系统。这些功能尚未完全移植到当前的以代理为主的系统中:
- 电子邮件恢复与确认
- 国家白名单/黑名单
- 内置代理 AntiBot
- Mojang 正版验证绕过
- 自定义外部表/列映射
- 旧版哈希导入/迁移格式
- 可编辑的多语言消息包
- 自动数据库备份
- 账户导入工具
这些是未来计划在代理端实现的候选功能。
要求
| 组件 |
支持情况 |
| Java |
21+ |
| 代理服务器 |
Velocity、BungeeCord |
| 后端 |
Spigot 风格、Paper、Purpur、Folia |
| Minecraft |
适用于 1.16–1.19、1.20–1.21 和 1.21+ 系列的后端变体 |
安装
- 将
Auth-Proxy-<version>.jar 安装到你的代理服务器上。
- 在每个后端服务器上安装对应的
Auth-Backend-<version>.jar。
- 启动一次代理以生成配置文件。
- 如有需要,编辑代理的配置文件。
- 重启代理和后端服务器。
- 加入服务器并使用以下命令注册:
/register <密码> <密码>
支持
如果出现问题,请提供以下信息:
- 代理类型和版本
- 后端服务器类型和版本
- 认证代理 JAR 文件名
- 认证后端 JAR 文件名
- 控制台错误日志
- 配置数据库类型

Auth
Auth is a proxy-first authentication system for Minecraft networks. It uses one proxy plugin for Velocity/BungeeCord and lightweight backend guard plugins for Spigot/Paper/Purpur/Folia servers.
Players authenticate on the proxy with /login or /register, while backend servers stay protected until the proxy confirms the player is logged in.
Addon Required - Link
Features
| Feature |
Status |
| Velocity support |
Yes |
| BungeeCord support |
Yes |
| Spigot backend guard |
Yes |
| Paper/Purpur backend guard |
Yes |
| Folia backend guard |
Yes |
| SQLite database |
Yes |
| MySQL / MariaDB / PostgreSQL |
Yes |
/login and /register |
Yes |
| Session login |
Yes |
| Authenticator 2FA |
Yes |
Admin /zauth commands |
Yes |
| Backend movement/chat/command protection |
Yes |
| Backend inventory/drop/damage protection |
Yes |
| Config auto-merge on update |
Yes |
| bStats support |
Yes |
Downloads
Auth builds multiple jars. Install the correct jar for each server type.
| Jar |
Install on |
Auth-Proxy-<version>.jar |
Velocity or BungeeCord proxy |
Auth-Backend-SpigotLegacy-<version>.jar |
Spigot-style 1.16-1.19 backends |
Auth-Backend-Spigot-<version>.jar |
Spigot-style 1.20-1.21 backends |
Auth-Backend-Paper-<version>.jar |
Paper/Purpur 1.21+ backends |
Auth-Backend-Folia-<version>.jar |
Folia 1.21+ backends |
Do not install the proxy jar on backend servers.
Do not install backend jars on the proxy.
How It Works
- A player joins the proxy.
- Auth checks whether the player is registered.
- The player logs in, registers, or verifies 2FA.
- The proxy sends the authenticated state to backend servers.
- Backend servers block gameplay until the proxy confirms login.
The backend and proxy communicate automatically over:
zcraftauth:state
No backend database setup is required.
Commands
| Command |
Description |
/login <password> |
Log into your account |
/l <password> |
Login alias |
/register <password> <password> |
Register a new account |
/reg <password> <password> |
Register alias |
/logout |
Log out and lock backend access again |
/changepass <old> <new> |
Change your password |
/2fa enable |
Generate an authenticator secret |
/2fa verify <code> |
Verify your 2FA login |
/2fa disable <code> |
Disable authenticator 2FA |
Admin Commands
/zauth requires:
zcraftauth.admin
| Command |
Description |
/zauth status |
Show authenticated player count |
/zauth unregister <player> |
Delete a player login |
/zauth setpassword <player> <password> |
Change a player password |
/zauth disable2fa <player> |
Remove a player's 2FA |
/zauth forcelogin <player> |
Mark a player as logged in |
/zauth logout <player> |
Mark a player as logged out |
Database Support
Auth supports:
- SQLite
- MySQL
- MariaDB
- PostgreSQL
Default config:
database:
type: sqlite
sqlite:
file: auth.db
External database example:
database:
type: mysql
external:
host: localhost
port: 3306
database: zcraft_auth
username: root
password: ""
ssl: false
Session Login
Auth can restore a player session when their IP matches the last known login IP.
session:
enabled: true
This helps avoid unnecessary re-logins while keeping backend servers protected.
Timeouts
Login and register timeouts are separate.
general:
login-timeout: 0
register-timeout: 0
Set either value to 0 to disable that timeout.
Backend Protection
The backend plugin is intentionally small and low-impact. It does not connect to the database and does not run repeating tasks.
It can block:
- Movement
- Chat
- Commands
- Inventory clicks
- Item drops
- Item pickup
- Damage
- Attacking
Backend config:
block-movement: true
allow-chat: false
enable-bypass-permission: false
allowed-commands:
- "/login"
- "/register"
- "/l"
- "/reg"
- "/2fa"
- "/totp"
- "/authenticator"
Operators are not bypassed by default.
2FA Authenticator
Players can enable authenticator-based 2FA:
/2fa enable
On future logins, after entering the correct password, they must verify:
/2fa verify <code>
Compatible with common authenticator apps such as Google Authenticator, Authy, 2FAS, and similar TOTP apps.
Performance
Auth is designed to stay light on backend servers:
- Backend plugin has no database connection.
- Backend plugin does not hash passwords.
- Backend plugin does not perform account lookups.
- Backend plugin only listens for protection events and proxy state.
- Proxy database operations run asynchronously.
- Prompt bars are event-driven.
This keeps backend TPS/MSPT impact minimal.
Currently Not Ported
The older Paper-only codebase contained more planned or legacy systems. These are not yet fully ported into the current proxy-first system:
- E-mail recovery and confirmation
- Country whitelist/blacklist
- Built-in proxy AntiBot
- Premium Mojang bypass
- Custom external table/column mapping
- Legacy hash import/migration formats
- Editable per-language message packs
- Automatic database backups
- Account importers
These are planned candidates for future proxy-side implementation.
Requirements
| Component |
Supported |
| Java |
21+ |
| Proxy |
Velocity, BungeeCord |
| Backend |
Spigot-style, Paper, Purpur, Folia |
| Minecraft |
Backend variants for 1.16-1.19, 1.20-1.21, and 1.21+ families |
Installation
- Install
Auth-Proxy-<version>.jar on your proxy.
- Install the matching
Auth-Backend-<version>.jar on each backend server.
- Start the proxy once to generate the config.
- Edit the proxy config if needed.
- Restart the proxy and backend servers.
- Join and register with:
/register <password> <password>
Support
If something does not work, include:
- Proxy type and version
- Backend server type and version
- Auth proxy jar name
- Auth backend jar name
- Console error logs
- Config database type
评论 0
登录后参与评分
还没有评论,来抢沙发吧