NetworkLock
玩家只能通过你的代理加入服务器。任何人都无法绕过。
如果有人发现了你某个游戏服务器的地址,他们可以直接连接并以任意玩家(包括管理员)的身份登录。NetworkLock 阻止这种行为。
你的代理会为每位玩家生成一个一次性通行证,该通行证仅对当前玩家、当前服务器有效,有效期为 30 秒。服务器会在玩家加载进入之前验证通行证。没有有效通行证,就无法进入。
功能
- 一个 JAR 包搞定一切。 将同一个
NetworkLock.jar 放在你的代理和每个服务器上即可。
- 阻止代理绕过。 在玩家加入之前拒绝直接连接。
- 阻止假玩家。 任何人都无法使用其他玩家的名称或 UUID 登录。
- 通行证不可重用。 每个通行证只能使用一次,仅限一台服务器,有效期 30 秒。
- 支持多个代理。 每个代理拥有独立的密钥。如果某个密钥泄露,只需移除该密钥对应的代理。
- 登录限制。 来自同一 IP 的过多登录尝试会被暂时阻止。
- 自定义消息。 玩家看到的所有消息均在代理端设置,并使用
& 颜色代码。
- 默认安全。 如果配置文件损坏,服务器会阻止所有玩家进入,而不是在无保护状态下运行。
- 无需数据库,无需额外插件。
安装
- 将
NetworkLock.jar 放入代理的 plugins 文件夹并启动一次。
- 打开代理的
plugins/NetworkLock/config.yml(Velocity 上为 plugins/networklock/config.yml)并复制其中的 key。
- 在代理上启用玩家转发(Velocity 上使用
modern,BungeeCord 上使用 ip_forward: true),并在你的游戏服务器上启用相应的设置。
- 在每个服务器上放置
NetworkLock.jar,启动一次,然后填写 plugins/NetworkLock/config.yml:
network:
server-id: "lobby" # 代理配置中服务器的名称
authentication:
trusted-proxies:
- id: "proxy-1"
keys: ["在此粘贴代理密钥"]
- 运行
/networklock reload,然后运行 /networklock doctor 检查一切是否正常。
在 Sponge 平台上,请使用 mods 文件夹和 config/networklock/config.yml,并在 config/sponge/sponge.conf 中启用 ip-forwarding。
命令
| 命令 |
作用 |
/networklock status |
显示保护是否已激活 |
/networklock reload |
重新加载配置(仅在配置有效时) |
/networklock doctor |
查找安装错误 |
/networklock stats |
显示允许和阻止的登录次数 |
/networklock proxies |
显示密钥指纹,用于对比代理和服务器 |
/networklock version |
显示版本号 |
别名:/nlock。权限:networklock.admin 用于所有命令,或 networklock.command.<name> 用于单个命令。
支持版本
| 平台 |
版本 |
| Paper, Folia, Purpur, Pufferfish |
Minecraft 1.21 至 26.3 |
| Sponge |
Minecraft 1.21.10 至 26.3 |
| Velocity |
3.5 及更高版本,包括 4.x |
| BungeeCord, Waterfall |
1.21 |
玩家可以使用你的代理接受的任何 Minecraft 版本加入。需要 Java 21 或更高版本(Minecraft 26.x 需要 Java 25)。
不支持 Plain Spigot 和 CraftBukkit,因为它们缺少 NetworkLock 所需的 Paper API。在这些平台上,它会将服务器锁定,而不是在无保护状态下运行。
注意事项
- 这不是 DDoS 防护。
- 仍然需要对服务器进行防火墙配置,确保只有你的代理可以访问它们。NetworkLock 是这层防护之后的锁。
- 如果代理密钥泄露,请从你的服务器中移除该密钥并运行
/networklock reload。
支持
有问题或疑问?在 获取帮助。
许可证
基于 MIT 许可证开源。
NetworkLock
Players can only join your servers through your proxy. Nobody gets around it.
If someone finds the address of one of your game servers, they can connect to it directly and log in as any player, admins included. NetworkLock stops that.
Your proxy gives every player a one-time pass that only works for that player, on that server, for 30 seconds. The server checks the pass before the player even loads in. No valid pass, no entry.
Features
- One jar for everything. Put the same
NetworkLock.jar on your proxy and on every server.
- Blocks proxy bypass. Direct connections are refused before the player joins.
- Blocks fake players. Nobody can log in with someone else's name or UUID.
- Passes can't be reused. Each one works once, on one server, for 30 seconds.
- Several proxies. Each proxy has its own key. If one leaks, remove just that one.
- Login limit. Too many logins from one IP get blocked for a while.
- Your messages. Every message players see is set on the proxy, with
& colour codes.
- Safe by default. If the config is broken, the server lets nobody in instead of running unprotected.
- No database, no extra plugins.
Setup
- Put
NetworkLock.jar in your proxy's plugins folder and start it once.
- Open the proxy's
plugins/NetworkLock/config.yml (on Velocity: plugins/networklock/config.yml) and copy the key.
- Turn on player forwarding on the proxy (
modern on Velocity, ip_forward: true on BungeeCord) and the matching setting on your game servers.
- Put
NetworkLock.jar on each server, start it once, and fill in plugins/NetworkLock/config.yml:
network:
server-id: "lobby" # the server's name in your proxy config
authentication:
trusted-proxies:
- id: "proxy-1"
keys: ["paste the proxy key here"]
- Run
/networklock reload, then /networklock doctor to check everything.
On Sponge, use the mods folder and config/networklock/config.yml, and turn on ip-forwarding in config/sponge/sponge.conf.
Commands
| Command |
What it does |
/networklock status |
Shows if protection is active |
/networklock reload |
Reloads the config (only if it's valid) |
/networklock doctor |
Finds setup mistakes |
/networklock stats |
Shows allowed and blocked logins |
/networklock proxies |
Shows key fingerprints to compare proxy and server |
/networklock version |
Shows the version |
Alias: /nlock. Permission: networklock.admin for everything, or networklock.command.<name> for each command.
Supported versions
| Platform |
Versions |
| Paper, Folia, Purpur, Pufferfish |
Minecraft 1.21 to 26.3 |
| Sponge |
Minecraft 1.21.10 to 26.3 |
| Velocity |
3.5 and newer, including 4.x |
| BungeeCord, Waterfall |
1.21 |
Players can join with any Minecraft version your proxy accepts. Needs Java 21 or newer (Java 25 for Minecraft 26.x).
Plain Spigot and CraftBukkit are not supported, because they are missing the Paper API that NetworkLock needs. On them it locks the server instead of running without protection.
Good to know
- This is not DDoS protection.
- Still firewall your servers so only your proxies can reach them. NetworkLock is the lock behind that.
- If a proxy key leaks, remove it from your servers and run
/networklock reload.
Support
Questions or problems? Get help at
License
Open source under the MIT license.
评论 0
登录后参与评分
还没有评论,来抢沙发吧