Gatekeeper 用加密密钥认证取代了离线模式服务器上的用户名/密码登录。每位玩家都持有一把唯一的数字密钥,服务器会识别它——无需猜测、分享或窃取密码。
专为小型离线模式服务器设计,适用于运营商亲自认识每一位玩家的情况。
支持 Fabric 和 Paper —— 两种服务端实现使用相同的协议,且同一个 Fabric 客户端模组均可兼容。
工作原理
首次连接 Gatekeeper 服务器时,模组会在后台为该服务器生成一对唯一的密钥对,并将其存储在你的电脑上。此后每次连接时,你的游戏都会通过密码学方式证明持有正确的密钥,而无需在网络上传输该密钥。服务器会将你的密钥与已批准列表进行比对,验证通过后放行。
无密码。无共享秘密。没有需要遗忘或泄露的内容。
要求
不支持 Spigot、CraftBukkit 和 Folia:在配置阶段保留玩家状态需要依赖 Paper 的连接 API。
安装
服务端(Fabric)
- 安装 Fabric 和 Fabric API。
- 将
gatekeeper-<version>.jar 放入 mods/ 文件夹。
- 在
server.properties 中设置 online-mode=false。
- 启动服务器 —— 会自动创建
config/mcgatekeeper/ 目录。
服务端(Paper)
- 将
gatekeeper-paper-<version>.jar 放入 plugins/ 文件夹。
- 在
server.properties 中设置 online-mode=false。
- 启动服务器 —— 会自动创建
plugins/McGatekeeper/ 目录。
重要提示: 在没有 Gatekeeper 的情况下,online-mode=false 意味着任何知道玩家用户名的人都可以冒充该玩家。Gatekeeper 消除了这一风险,但这也意味着你必须先批准每位新玩家,他们才能加入服务器。
客户端
- 安装 Fabric 和 Fabric API。
- 将
gatekeeper-<version>.jar 放入你的 mods/ 文件夹。
- 完成 —— 密钥会自动生成并存储。
首次连接
当玩家第一次连接时:
- 后台为该服务器生成一对密钥。
- 连接界面会显示一条消息,提示服务器正在等待管理员批准。
- 运营商执行
/gate allow <username> <label> 来批准该玩家并注册其密钥。
玩家将被立即放行,其密钥会被记住,以便后续从该设备连接时使用。
管理员命令
| 命令 |
功能 |
/gate allow <player> <label> |
批准等待中的玩家并注册其密钥 |
/gate list <player> |
列出某玩家的所有已注册密钥及其指纹 |
/gate reset <player> |
移除某玩家的所有密钥 |
/gate reset <player> <label> |
移除单个密钥(例如丢失的设备) |
对 /gate allow 使用 Tab 补全可建议当前等待批准的玩家。
在 Fabric 上需要操作员等级 3,或在 Paper 上需要 mcgatekeeper.admin 权限(默认授予操作员)。
密钥管理
你可以通过 模组 → Gatekeeper → 管理密钥(需要 Mod Menu)查看和管理已存储的密钥。每个条目会显示该密钥上次使用的服务器地址,以及服务器密钥和客户端密钥的简短指纹。
如需完整的技术文档、安全模型说明及源代码,请参阅 GitHub 仓库。
Gatekeeper replaces username/password login on offline-mode servers with cryptographic key authentication. Every player holds a unique digital key that the server recognises — no password to guess, share, or steal.
Designed for small offline-mode servers where the operator personally knows every player.
Runs on Fabric and on Paper — both server implementations speak the same protocol, and the same Fabric client mod works with either.
How it works
When you connect to a Gatekeeper server for the first time, the mod silently generates a unique key pair for that server and stores it on your computer. Every subsequent connection your game proves — cryptographically — that it holds the right key, without ever transmitting it over the network. The server checks your key against its approved list and lets you in.
No passwords. No shared secrets. Nothing to forget or leak.
Requirements
- Server: either Fabric with Fabric API, or Paper
- Client: Fabric with Fabric API
- Every connecting client must have the mod installed, whichever server platform you run
- Client and server must be on matching versions — an outdated client is turned away with a message naming the version to install
- The server must run with
online-mode=false in server.properties
Spigot, CraftBukkit and Folia are not supported: holding a player in the configuration phase needs Paper's connection API.
Installation
Server (Fabric)
- Install Fabric and Fabric API.
- Drop
gatekeeper-<version>.jar into the mods/ folder.
- Set
online-mode=false in server.properties.
- Start the server — a
config/mcgatekeeper/ directory is created automatically.
Server (Paper)
- Drop
gatekeeper-paper-<version>.jar into the plugins/ folder.
- Set
online-mode=false in server.properties.
- Start the server — a
plugins/McGatekeeper/ directory is created automatically.
Important: online-mode=false without Gatekeeper means anyone who knows a player's username can impersonate them. Gatekeeper eliminates that risk, but it means you must approve every new player before they can join.
Client
- Install Fabric and Fabric API.
- Drop
gatekeeper-<version>.jar into your mods/ folder.
- That's it — keys are generated and stored automatically.
First connection
The first time a player connects:
- A key pair is generated for that server in the background.
- The connection screen shows a message saying the server is waiting for admin approval.
- An operator runs
/gate allow <username> <label> to approve the player and register their key.
The player is let in immediately and their key is remembered for all future connections from that device.
Admin commands
| Command |
What it does |
/gate allow <player> <label> |
Approves a waiting player and registers their key |
/gate list <player> |
Lists all registered keys for a player with fingerprints |
/gate reset <player> |
Removes all keys for a player |
/gate reset <player> <label> |
Removes a single key (e.g. a lost device) |
Tab-complete on /gate allow suggests players currently awaiting approval.
Requires operator level 3 on Fabric, or the mcgatekeeper.admin permission (granted to operators by default) on Paper.
Key management
You can view and manage your stored keys via Mods → Gatekeeper → Manage Keys (requires Mod Menu). Each entry shows the server address the key was last used with, plus short fingerprints for both the server and client keys.
For full technical documentation, the security model, and source code, see the GitHub repository.
评论 0
登录后参与评分
还没有评论,来抢沙发吧