WarezProtect
由 zahadneokurkycz 开发的防小号与防冒充插件
简介
用这款轻量级安全插件保护你的服务器!它的作用是检测并可能阻止玩家使用小号(ALT)或通过修改客户端伪装成其他用户登录,即所谓的“冒充”。这一切都不需要强制玩家使用 /login 或类似的安全措施,而这些通常会让玩家感到相当困扰。该插件主要面向小型服务器,能够在保持安全性的同时为所有玩家提供自动用户验证。
工作原理
WarezProtect 使用 IP 地址和登录顺序 来检测可疑行为:
- 小号检测
如果一名玩家首次加入服务器时使用的 IP(用于注册)被另一个账户用作其注册的第一个 IP,则该第二个账户会被标记为小号。
- 冒充检测
如果多个账户是用不同的 IP 注册的,但其中一个账户后来使用了他人注册时使用的 IP,或者使用了他人的主要登录 IP 进行登录,则该登录尝试会被标记为可能的冒充行为。
示例:
- 玩家 A 从 IP 192.168.0.128 注册
- 玩家 B 从 IP 192.168.0.067 注册
- 如果玩家 B 后来使用 IP 192.168.0.128 加入服务器,插件将假定 玩家 A 可能在冒充玩家 B
命令
基础嵌套命令
/wp <flag | inspect | ip> [player]
这是所有其他命令的别名(见下文的具体用法)
别名:/warezprotect
权限:warezprotect.base
子命令所需的权限:
warezprotect.ip
warezprotect.inspect
warezprotect.flag
Flag(构建缓存 / 启动检测)
/wpf
此命令启动手动检测。检测会按计划自动运行,但这提供了一个手动启动的选项。检测结果会保存到缓存中。
别名:/wpflag, /flagalts, /wp flag, /flagplayers
权限:warezprotect.flag
Inspect(查看检测结果)
/wpi [player]
此命令允许你在游戏中浏览检测结果。
它还允许你查找特定玩家的信息。
别名:/altsinspect, /wpinspect, /wp inspect
权限:warezprotect.inspect
显示你的 IP
/ip
顾名思义。主要是调试功能的遗留项。
别名:/wp ip, /whatsmyip
权限:warezprotect.ip
权限
warezprotect.base
这是查看基础嵌套命令的基本权限
可用命令:
默认值:所有人可用
warezprotect.flag
允许玩家在-game 内启动手动检测
可用命令:
/wpflag
/flagalts
/wp flag
/flagplayers
默认值:仅限 OP
warezprotect.inspect
允许玩家在-game 内浏览检测结果
可用命令:
/altsinspect
/wpinspect
/wp inspect
默认值:仅限 OP
warezprotect.ip
允许玩家查看自己的 IP
可用命令:
默认值:所有人可用
warezprotect.debug
调试命令的权限(这些命令可能存在于测试版中,或者在正式版中被意外保留)
可用命令:当前无
默认值:仅限 OP
配置
显示默认配置
# 是否以及希望在新玩家加入服务器时显示什么内容
# {} 代表玩家名称
useWelcomeMessage: true
welcomeMessage: Hello, {} welcome to the server!
# 控制数据保存的频率
# 有三种选项:
# IMMEDIATE - 数据创建/修改后立即保存
# - 资源占用最高 - 可能会影响性能,尤其是在玩家数量较多时
# - 无数据丢失风险
# - 推荐用于玩家数量极少的服务器
# SCHEDULER - 每 10 分钟保存一次数据,并在服务器关闭时保存
# - 资源占用最小 - 对性能影响极低
# - 数据丢失风险低 - 如果服务器崩溃,最多只可能丢失最后 10 分钟的数据
# - 推荐大多数服务器使用
# ONSTOP - 仅在服务器关闭时保存数据
# - 不占用资源 - 数据保存过程不消耗任何资源
# - 数据丢失风险高 - 如果服务器崩溃,自服务器启动以来的所有数据都会丢失
# - 不推荐
savingMethod: SCHEDULER
# ########################
#
# 用户标记
#
##########################
# 控制我们搜索冒充、小号以及重建缓存的频率
# 共有四种选项:
# ONJOIN - 任何玩家加入后立即搜索小号和冒充行为
# - 资源占用最高 - 可能对性能产生显著影响,尤其是在玩家频繁加入时
# - 即时检测
# - 推荐用于将即时检测作为优先事项的服务端——否则不推荐
# SCHEDULER - 每 20 分钟以及服务器关闭时搜索小号和冒充行为
# - 资源占用最小 - 对性能影响较低
# - 快速检测且更新频繁 - 在玩家数量庞大或服务器性能较低的情况下,可能会导致一些中等程度的延迟(每 20 分钟约 ~50+ 毫秒的延迟)
# - 大多数服务端推荐此选项
# ONSTOP - 仅在服务器关闭时搜索小号和冒充行为
# - 无资源占用 - 可能会略微减慢服务器关闭速度
# - 被标记玩家的列表不会频繁更新
# - 推荐用于有一定频率重启的服务端(大约每 1-2 天重启一次)
# MANUALLY - 仅当管理员执行 /flagplayers 命令时搜索小号和冒充行为
# - 无资源占用
# - 被标记玩家的列表不会自动更新
# - 不推荐
flaggingFrequency: SCHEDULER
# 如果您希望跳过对小号进行单独标记。
# 例如,在这种情况下,玩家 "p1" 可以拥有一个小号 "p2"(反之亦然),它将不会被标记为
# 小号。您可以添加无限数量的账号对
# 如果您不想使用此功能,可以通过设置 pairsToSkip: [] 来禁用它
pairsToSkip:
- p1: p2
适用对象
- 不希望使用登录系统的服务端
- 希望拥有简单小号检测功能的用户
- 可作为 Authme 等插件的补充使用
通知
您不得以未修改的形式重新分发本软件或其源代码。
如果您希望分享或重新分发本项目,请确保包含有意义的更改并正确标注原始项目来源。
感谢您尊重为此付出的工作。
WarezProtect
Anti‑alt and anti-impersonation plugin by zahadneokurkycz
Introduction
Protect your server with this lightweight security plugin! Its job is to detect and potentially prevent people from using ALT accounts and logging as another user (via modified clients) aka impersonation. All of this, without forcing players to use /login or similar security measures, which are usually pretty annoying for players. It's designed mainly for smaller servers that could benefit from automatic user validation for all players while keeping its security.
How it works
WarezProtect uses IP addresses and login order to detect suspicious behavior:
- Alt detection
If the IP, which the player joined for the first time (registered with on the server) is used as a first IP (used for registration) on another account, the second one is flagged as an ALT account
- Impersonation detection
If accounts were registered with different IPs, but one later joins using the ip that someone else used for registration, or used as primary login IP address, this login attempt is flagged as a possible impersonation attempt.
Example:
- Player A registered from IP 192.168.0.128
- Player B registered from IP 192.168.0.067
- If Player B later joins using IP 192.168.0.128, the plugin assumes Player A may be impersonating Player B
Commands
Base nested command
/wp <flag | inspect | ip> [player]
This is just an alias for all other commands (see their use cases below)
Aliases: /warezprotect
Permission: warezprotect.base
Permissions for its subcommands:
warezprotect.ip
warezprotect.inspect
warezprotect.flag
Flag (builds cache / starts detection)
/wpf
This command starts manual detection. Detection runs automatically on schedule, but this is an option to start it manually. Detection results are saved to cache.
Aliases: /wpflag, /flagalts, /wp flag, /flagplayers
Permission: warezprotect.flag
Inspect (show detection results)
/wpi [player]
This command allows you to read through the detection results in game.
This also allows you to look up specific players.
Aliases: /altsinspect, /wpinspect, /wp inspect
Permission: warezprotect.inspect
Show your IP
/ip
Self explanatory. Mainly just a remnant from debugging
Aliases: /wp ip, /whatsmyip
Permission: warezprotect.ip
Permissions
warezprotect.base
This is just a permission to even see the base nested command
Commands:
Default value: Allowed for everyone
warezprotect.flag
This allows players to starts manual detection in-game
Commands:
/wpflag
/flagalts
/wp flag
/flagplayers
Default value: OP only
warezprotect.inspect
This allows players to look through the detection results in-game
Commands:
/altsinspect
/wpinspect
/wp inspect
Default value: OP only
warezprotect.ip
This allows players to see their own ip
Commands:
Default value: Allowed for everyone
warezprotect.debug
Permission for debug commands (those may be in betas, or they could be accidentally left in releases)
Commands: currently nothing
Default value: OP only
Config
Show default config
# If and what do you want to show as soon as someone joins the server
# {} is representing the player name
useWelcomeMessage: true
welcomeMessage: Hello, {} welcome to the server!
# Controls how often data should be saved
# There are three options:
# IMMEDIATE - Saves data immediately after they are created/modified
# - Highest resource usage - can impact performance especially with higher player count
# - No risk of data loss
# - Recommended for servers with very low player count
# SCHEDULER - Saves data every 10 minutes and when the server is stopped
# - Minimal resource usage - very low performance impact
# - Low risk of data loss - in case of a server crash, at most only the last 10 minutes may be lost
# - RECOMMENDED for most servers
# ONSTOP - Saves data only when the server is stopped
# - No resource usage - Data saving process does not consume any resources
# - High risk of data loss - in case of a server crash, all data since the start of the server are lost
# - NOT recommended
savingMethod: SCHEDULER
# ########################
#
# USER FLAGGING
#
##########################
# Controls how often should we search for impersonation, alt accounts and rebuild cache
# There are four options:
# ONJOIN - Searches for alts/impersonation immediately after any player joins
# - Highest resource usage - can have significant impact on performance especially when players join frequently
# - Immediate detection
# - Recommended for servers where immediate detection is a priority - otherwise NOT recommended
# SCHEDULER - Searches for alts/impersonation every 20 minutes and when the server is stopped
# - Minimal resource usage - low performance impact
# - Fast detection and frequent updates - in case of high volume of unique players or low server performance may lead to some moderate lag (~50+ ms lag every 20 mins)
# - RECOMMENDED for most servers
# ONSTOP - Searches for alts/impersonation only when the server is stopped
# - No resource usage - may slow down server shut down (although slightly)
# - List of flagged players does not update as frequently
# - RECOMMENDED for servers with somewhat frequent restarts (restart every ~1-2 days)
# MANUALLY - Searches for alts/impersonation only when administrator invokes /flagplayers command
# - No resource usage
# - List of flagged players does not update automatically
# - NOT recommended
flaggingFrequency: SCHEDULER
# If you want to skip flagging individual alt accounts.
# For example, in this case player "p1" can have an alt account "p2" (or the other way around) and it won't get flagged as
# an alt account. You can add an indefinite number of account pairs
# If you don't want to use this feature, you can DISABLE it by setting pairsToSkip: []
pairsToSkip:
- p1: p2
Who is it for?
- servers who don't want to use login systems
- servers who want simple ALT detector
- can be used as an addition to plugins like Authme and others
NOTICE
You may not redistribute this software or its respective source code in unchanged form.
If you wish to share or redistribute this project, make sure to include meaningful changes and proper attribution to the original project.
Thank you for respecting the work that went into this.
评论 0
登录后参与评分
还没有评论,来抢沙发吧