mAuth
为已认证的 Paper、Purpur 和 Velocity 网络提供二级账号安全保护。
包含密码确认、Mojang 认证的 Java 账号、通过 Floodgate 认证的 Bedrock 账号、TOTP(基于时间的一次性密码)、恢复机制、活跃会话管理、旧版数据导入以及代理路由功能,且无需依赖外部数据库。Discord、Telegram 和 Velocity 插件作为独立的附加组件存在。
mAuth 仅支持经过认证的 Minecraft 客户端。独立服务器必须设置 online-mode=true。Velocity 网络必须在代理端启用 online-mode=true,并将安全的玩家信息转发至后端服务器。如果代理未使用 Mojang 认证 Java 账号,Velocity 附加组件将拒绝启动。
功能特性
- 采用 Argon2id 算法进行密码哈希,并支持从 bcrypt 和常见的 AuthMe 风格哈希格式迁移
- 支持 H2、SQLite、MySQL、MariaDB 和 PostgreSQL 存储,并具备架构升级能力
- 支持 Mojang 认证的 Java 账号,以及通过 Floodgate 实现的 Bedrock 自动登录
- 提供 TOTP、恢复码、经验证的邮箱恢复、会话管理和账号锁定功能
- 包含登录验证码、连接洪水处理、IP 限制、共享 IP 会话保护、昵称过滤器以及 VPN 提供商识别
- 登录与注册可设置不同的截止时间,并显示本地化的倒计时 Boss 栏
- 重复会话保护,并在内置的 limbo 世界周围实现可靠的保存/恢复机制
- 支持从 AuthMe、nLogin、LibreLogin 和 OpeNLogin 导入账号数据
- 提供受保护的本地 Web 面板、PlaceholderAPI 占位符值、审计历史记录以及 bStats 统计
运行环境
- Java 25
- 兼容 Paper 的服务端版本 26.3
- 仅在搭配代理插件使用时需要 Velocity
- 独立服务器或 Velocity 代理需启用 Mojang 认证
安装指南
- 将
mAuth-1.0.3.jar 放入后端服务器的 plugins 目录中。
- 独立服务器请保持
online-mode=true。对于 Velocity 网络,请在代理端保持 online-mode=true 并配置安全的玩家信息转发。
- 首次启动服务器后,编辑
plugins/mAuth/config.yml 配置文件。
- 将可选的附加组件 jar 文件放置在核心 jar 文件旁边。
- 若使用代理模式,请在代理端和后端设置相同的
shared-secret(共享密钥)。
默认存储引擎为 H2。Discord、Telegram、邮箱、VPN 查询以及 Web 面板在未配置前均处于禁用状态。bStats 统计和更新检查可以单独禁用。
配置说明
security:密码哈希、登录/注册超时设置、Boss 栏、登录限制、TOTP 加密、会话管理、重复会话保护以及新 IP 或设备处理
storage:数据库类型、本地文件、连接池设置或完整的 JDBC URL 覆盖
discord、telegram 和 email:账号绑定、验证、通知及恢复功能
proxy.shared-secret:与 Velocity 附加组件进行的签名同步
vpn 和 geoip:风险服务提供商、地理位置数据库、缓存机制以及失败开放或失败关闭行为
web:绑定地址、端口以及生成的 Basic 认证令牌
metrics.bstats-id 和 updates.modrinth-project-id:可选的指标数据和更新发现 ID
配置文件带有版本号。当 mAuth 升级旧版配置时,缺失的设置项会自动添加。玩家消息文本位于 lang/en_US.yml 和 lang/ru_RU.yml;可通过 language.default 选择其他语言文件。
切勿在没有可信反向代理和 TLS 的情况下将 Web 面板暴露给公共互联网。请妥善保管机器人令牌、SMTP 凭据、代理密钥以及 security.data-encryption-key。
Web 面板
受保护的 Web 面板列出账号及活跃会话,并允许管理员终止某个账号的所有会话。

构建产物
mAuth-1.0.3.jar:Paper、Purpur 和 Folia 核心插件
mAuth-API-1.0.3.jar:公开接口及认证事件 API
mAuth-Velocity-1.0.3.jar:经认证的 Velocity 登录路由插件
mAuth-Discord-1.0.3.jar:Discord 绑定与恢复插件
mAuth-Telegram-1.0.3.jar:Telegram 绑定与恢复插件
玩家指令
/register、/login、/logout、/changepassword、/premium、/passwordlogin、/2fa、/sessions、/email、/recover 和 /telegram 均通过 Paper Commands API 注册。不完整的命令由 mAuth 处理,并显示本地化的用法提示,而非服务器的通用语法错误。
管理
/mauth 提供重载、导入、强制登录、账户锁定以及 Discord 历史记录操作。/mauthreset、/mauthunlink、/mauthlog 和 /mauthip 是面向管理员的账户工具。完整的 IP 地址仅通过受保护的 IP 历史记录权限暴露。
PlaceholderAPI
当安装 PlaceholderAPI 后,mAuth 会注册 %mauth_authenticated%、%mauth_status% 和 %mauth_version%。
遥测与更新
mAuth 使用 bStats 插件 ID 33343 进行匿名使用统计。可通过设置 metrics.enabled: false 禁用数据收集。更新检查器读取公开的 Modrinth 项目信息,并可通过独立设置 updates.enabled: false 禁用。
构建
./gradlew clean build :api:build :discord:build :velocity:build :telegram:build
本项目采用 MIT 许可证授权。
mAuth
Secondary account security for authenticated Paper, Purpur, and Velocity networks.
Password confirmation, Mojang-authenticated Java accounts, Floodgate-authenticated Bedrock accounts, TOTP, recovery, active sessions, legacy imports, and proxy routing are included without requiring an external database. Discord, Telegram, and Velocity are separate addons.
mAuth only supports authenticated Minecraft clients. A standalone server must use online-mode=true. A Velocity network must use online-mode=true on the proxy and secure player information forwarding to its backend servers. The Velocity addon refuses to start unless the proxy authenticates Java accounts with Mojang.
What it does
- Argon2id passwords with migration from bcrypt and common AuthMe-style hashes
- H2, SQLite, MySQL, MariaDB, and PostgreSQL storage with schema upgrades
- Mojang-authenticated Java accounts and Bedrock autologin through Floodgate
- TOTP, recovery codes, verified email recovery, sessions, and account locks
- login captcha, connection flood handling, IP limits, shared-IP session protection, nickname filters, and VPN providers
- separate login/registration deadlines with a localized countdown boss bar
- duplicate-session protection and reliable save/restore around the built-in limbo world
- account imports from AuthMe, nLogin, LibreLogin, and OpeNLogin
- a protected local web panel, PlaceholderAPI values, audit history, and bStats
Requirements
- Java 25
- Paper-compatible server 26.3
- Velocity only when using the proxy addon
- Mojang authentication enabled on the standalone server or Velocity proxy
Install
- Put
mAuth-1.0.3.jar in the backend server plugins directory.
- Keep
online-mode=true on a standalone server. For a Velocity network, keep online-mode=true on the proxy and configure secure player information forwarding.
- Start the server once and edit
plugins/mAuth/config.yml.
- Add optional addon jars beside the core jar.
- For proxy mode, set the same
shared-secret on the proxy and backend.
H2 is the default storage. Discord, Telegram, email, VPN lookup, and the web panel stay disabled until configured. bStats and update checks can be disabled separately.
Configuration
security: password hashing, separate login/registration timeouts, bossbar, login limits, TOTP encryption, sessions, duplicate-session protection, and new IP or device handling
storage: database type, local file, pool settings, or a complete JDBC URL override
discord, telegram, and email: account linking, verification, notifications, and recovery
proxy.shared-secret: signed synchronization with the Velocity addon
vpn and geoip: risk provider, location database, caching, and fail-open or fail-closed behavior
web: bind address, port, and generated Basic authentication token
metrics.bstats-id and updates.modrinth-project-id: optional metrics and update discovery
Config files carry a version number. Missing settings are added when mAuth upgrades an older config. Player messages live in lang/en_US.yml and lang/ru_RU.yml; another locale file can be selected with language.default.
Do not expose the web panel to the public Internet without a trusted reverse proxy and TLS. Keep bot tokens, SMTP credentials, the proxy secret, and security.data-encryption-key private.
Web panel
The protected panel lists accounts and active sessions and lets an administrator terminate every session for an account.

Artifacts
mAuth-1.0.3.jar: Paper, Purpur, and Folia core
mAuth-API-1.0.3.jar: public interfaces and authentication event
mAuth-Velocity-1.0.3.jar: authenticated Velocity login routing
mAuth-Discord-1.0.3.jar: Discord linking and recovery
mAuth-Telegram-1.0.3.jar: Telegram linking and recovery
Player commands
/register, /login, /logout, /changepassword, /premium, /passwordlogin, /2fa, /sessions, /email, /recover, and /telegram are registered through the Paper Commands API. Incomplete commands are handled by mAuth and show localized usage instead of the server's generic syntax error.
Administration
/mauth provides reload, import, force-login, account lock, and Discord history operations. /mauthreset, /mauthunlink, /mauthlog, and /mauthip are owner-facing account tools. Full IP addresses are only exposed through the protected IP-history permission.
PlaceholderAPI
When PlaceholderAPI is installed, mAuth registers %mauth_authenticated%, %mauth_status%, and %mauth_version%.
Telemetry and updates
mAuth uses bStats plugin ID 33343 for anonymous usage statistics. Disable collection with metrics.enabled: false. The update checker reads the public Modrinth project and can be disabled independently with updates.enabled: false.
Build
./gradlew clean build :api:build :discord:build :velocity:build :telegram:build
The project is licensed under the MIT License.
评论 0
登录后参与评分
还没有评论,来抢沙发吧