?️ KatIPAuth (KIA)
KatIPAuth 是一款针对 Minecraft 1.19 至 1.21.x 优化的插件,可将账号锁定至特定 IP。
它为盗版服务器提供账号安全保障,无需依赖复杂的认证插件。
无需密码,无需会话。只需 IP 验证通过即可进入,否则请离开。
? 主要功能
? UUID-IP 身份锁定
- 双重绑定:在玩家首次加入时绑定玩家 UUID 和 IP,以实现最高级别的安全防护。
- 双向验证:UUID 只能使用其绑定的 IP,且每个 IP 只能被其绑定的 UUID 使用。
- 多账号支持:可选的多账号模式允许同一 IP 下存在多个 UUID,并支持配置数量限制。
- 登录拦截:自动阻止不匹配的 UUID-IP 组合访问。
- 具体错误提示:清晰、可操作的踢出消息,说明访问被拒绝的原因。
? 子网锁定(测试版)
- 动态 IP 支持:通过允许来自同一子网的连接来解决动态 IP 问题。
- 安全平衡:为 ISP 范围内 IP 发生变化的玩家提供灵活性,同时仍会阻止来自其他地方的未授权访问。
? Discord 警报与日志记录
- 实时 Discord 通知:向配置的 Webhook 发送详细的嵌入消息,包含玩家信息、存储的 ID、尝试详情和时间戳。
- 控制台日志:所有登录尝试(成功和失败)都会记录到控制台和文件中,以便审计追踪。
- 完整审计轨迹:带有时间戳的本地日志文件,用于合规性和故障排除。
?️ 维护与工具
- 自动配置更新:在插件更新时,自动向
config.yml 添加缺失的设置项和注释。
- H2 数据库:持久化、可靠的存储方式,支持从旧格式自动迁移。
- 格式化数据:以标准可读格式(
yyyy-MM-dd HH:mm:ss)查看绑定时间。
? 命令
玩家命令
/ipstatus
- 显示您当前使用的 IP 是否已绑定。
- 以可读格式显示确切的 绑定时间。
管理员命令(权限:ipauth.admin)
/ipinfo <player>
- 显示任意玩家的存储 UUID、IP 地址和原始绑定时间。
/ipreset <player>
- 重置玩家的 UUID-IP 绑定并立即将其踢出。显示已移除的 UUID 和 IP。下次他们加入时所使用的 IP 将成为新的绑定 IP。
/ipforce <player>
- 移除玩家当前的 UUID-IP 绑定。与
/ipreset 不同,它 不会 踢出玩家;下次他们加入时,将绑定一个新的 UUID-IP 对。
/ipreload
- 重新加载
config.yml 并重新初始化所有设置(包括 Discord Webhook)。
⚙️ 配置
以下是 config.yml 的示例及各部分的解释:
# 用于记录 IP 更改的 Discord Webhook URL(可选)
discord:
webhook: "PUT_WEBHOOK_URL_HERE"
# 隐私设置
privacy:
mask-ips: false # 如果为 true,IP 的最后两个字节将被替换为 x(例如 192.168.xx.xx)
# 调试设置
debug:
verbose: false # 如果为 true,将在控制台中打印玩家加入、拦截、IP 更改等的调试信息
# 安全设置
security:
allow-multiple-accounts: true # 如果为 true,多个 UUID 可以绑定到同一个 IP。
max-accounts-per-ip: 2 # 每个 IP 允许的最大账号数量。需要 allow-multiple-accounts=true 才能生效。
# 自定义消息
messages:
blocked: "&c登录被阻止。如果您认为这是误操作,请联系管理员" # 默认备用消息
uuid-ip-mismatch: "&c登录被阻止:UUID 绑定到了不同的 IP。如果您认为这是误操作,请联系管理员"
ip-uuid-mismatch: "&c登录被阻止:IP 已绑定到其他账号"
max-accounts: "&c登录被阻止:此 IP 已达到最大账号数量限制"
# 测试版功能(谨慎使用)
beta:
subnet-locking: false # 如果为 true,只要玩家在同一个 /24 子网内(例如 192.168.1.*),就可以加入服务器
安全设置说明
- allow-multiple-accounts:当设置为
true 时,多名玩家可以使用相同的 IP(适用于局域网)。当设置为 false 时,每个 IP 仅锁定给单个 UUID。
- max-accounts-per-ip:当启用多账号功能时,限制可以使用相同 IP 的不同 UUID 数量。
❓ 常见问题
Q: UUID-IP 绑定是如何工作的?
- A: 在玩家首次加入时,玩家的 UUID 和 IP 会被绑定在一起。要访问服务器,玩家必须同时使用相同的 UUID(账号)和相同的 IP。这防止了跨不同 IP 共享账号以及跨不同账号共享 IP(除非启用了多账号功能)。
Q: 我可以允许同一 IP 下的多名玩家吗?
- A: 是的。启用
security.allow-multiple-accounts: true 并将 security.max-accounts-per-ip 设置为您想要的限制值(默认:2)。这对于局域网或共享互联网连接非常有用。
Q: 动态 IP 玩家可以使用这个插件吗?
- A: 可以。如果他们的 IP 在同一子网内发生变化,您可以在测试版设置中启用 子网锁定。
提醒:子网锁定是一项测试版功能,可能尚未完全稳定。
Q: VPN 能绕过这个保护吗?
- A: 不能。除非 VPN 用户从其绑定 IP 或子网内加入,否则他们将被阻止。
Q: 这与其他认证插件兼容吗?
- A: 兼容。它在玩家甚至还没有进入服务器之前独立工作,使其成为与 AuthMe 等插件配合使用的绝佳第二层安全防护。
Q: 我如何查看被阻止的内容及其原因?
- A: 检查控制台日志(按 [KatIPAuth] 过滤)或位于
plugins/KatIPAuth/LOGS/ 中的本地日志文件。启用 debug.verbose: true 以获取详细信息。Discord Webhook(如果已配置)也会发送警报。
Q: 如何重置玩家的绑定?
- A: 请管理员使用
/ipreset <玩家> 命令重置其 UUID-IP 绑定并踢出该玩家。之后,玩家可以重新加入以绑定新的凭据。重置命令会显示已移除的 UUID 和 IP。
问:日志存储在哪里?
- 答:本地日志存储在
plugins/KatIPAuth/LOGS/ 目录下,按天生成的文件名格式为 yyyy-MM-dd.log。Discord Webhook(如果已配置)可提供实时警报。
?️ KatIPAuth (KIA)
KatIPAuth is an optimized plugin for Minecraft 1.19 to 1.21.x that locks accounts to IPs.
It provides account security for cracked servers without the need for complex authentication plugins.
No passwords. No sessions. Just IP says yes or go home.
? Key Features
? UUID-IP Identity Locking
- Dual Binding: Binds both player UUID and IP on first join for maximum security.
- Bidirectional Verification: UUID can only use its bound IP, and each IP can only be used by its bound UUID.
- Multi-Account Support: Optional multi-account mode allows multiple UUIDs on the same IP with configurable limits.
- Login Block: Automatically blocks access from mismatched UUID-IP combinations.
- Specific Error Messages: Clear, actionable kick messages that explain why access was denied.
? Subnet Locking (BETA)
- Dynamic IP Support: Solving dynamic IP issues by allowing connections within the same subnet.
- Security Balance: Provides flexibility for players whose IPs change within their ISP's range while still blocking unauthorized access from elsewhere.
? Discord Alerts & Logging
- Real-time Discord Notifications: Sends detailed embeds to your configured webhook with player info, stored ID, attempt details, and timestamps.
- Console Logging: All login attempts (success and failure) are logged to console and files for audit trails.
- Complete Audit Trail: Local log files with timestamps for compliance and troubleshooting.
?️ Maintenance & Utilities
- Auto Config Update: Automatically adds missing settings and comments to your
config.yml on plugin updates.
- H2 Database: Persistent, reliable storage with automatic migrations from legacy formats.
- Formatted Data: View binding times in standard readable formats (
yyyy-MM-dd HH:mm:ss).
? Commands
Player Commands
/ipstatus
- Shows if your currently used IP is bound.
- Shows exactly when it was bound in a readable format.
Admin Commands (Permission: ipauth.admin)
/ipinfo <player>
- Displays the stored UUID, IP address, and original binding time for any player.
/ipreset <player>
- Resets a player's UUID-IP binding and kicks them instantly. Shows which UUID and IP were removed. The next IP they join with will be their new bound IP.
/ipforce <player>
- Removes a player's current UUID-IP binding. Unlike
/ipreset, it does NOT kick the player; the next time they join, a new UUID-IP pair will be bound.
/ipreload
- Reloads the
config.yml and re-initializes all settings (including Discord webhooks).
⚙️ Configuration
This is a sample of the config.yml with explanations for each section:
# Discord Webhook URL for logging IP changes (optional)
discord:
webhook: "PUT_WEBHOOK_URL_HERE"
# Privacy settings
privacy:
mask-ips: false # If true, last two octets of IPs will be replaced with x (e.g. 192.168.xx.xx)
# Debug settings
debug:
verbose: false # If true, print debug info in console for player joins, blocks, IP changes, etc.
# Security settings
security:
allow-multiple-accounts: true # If true, multiple UUIDs can bind to the same IP.
max-accounts-per-ip: 2 # Maximum number of accounts allowed per IP. Need allow-multiple-accounts=true for this to work.
# Customizable messages
messages:
blocked: "&cLogin blocked. If you believe this is a mistake contact the owner" # Default fallback message
uuid-ip-mismatch: "&cLogin blocked: UUID bound to different IP. Contact the owner if this is a mistake"
ip-uuid-mismatch: "&cLogin blocked: IP already bound to another account"
max-accounts: "&cLogin blocked: Maximum number of accounts reached for this IP"
# Beta features (Use with caution)
beta:
subnet-locking: false # If true, players can join as long as they are in the same /24 subnet (e.g. 192.168.1.*)
Security Settings Explained
- allow-multiple-accounts: When
true, multiple players can use the same IP (useful for local networks). When false, each IP is locked to a single UUID.
- max-accounts-per-ip: When multi-account is enabled, limits the number of different UUIDs that can use the same IP.
❓ FAQ
Q: How does the UUID-IP binding work?
- A: On first join, a player's UUID and IP are bound together. To access the server, a player must use both the same UUID (account) AND the same IP. This prevents account sharing across different IPs and IP sharing across different accounts (unless multi-account is enabled).
Q: Can I allow multiple players on the same IP?
- A: Yes. Enable
security.allow-multiple-accounts: true and set security.max-accounts-per-ip to your desired limit (default: 2). This is useful for local networks or shared internet connections.
Q: Can dynamic IP players use this?
- A: Yes. If their IP changes within the same subnet, you can enable Subnet Locking in the beta settings.
Reminder: Subnet Locking is a beta feature and may not be fully stable.
Q: Can VPNs bypass this?
- A: No. VPN users get blocked unless they join from an IP that matches their binding or the subnet.
Q: Is this compatible with other auth plugins?
- A: Yes. It works independently before players even enter the server, making it a great second layer of security alongside plugins like AuthMe.
Q: How do I see what's blocked and why?
- A: Check the console logs (filtered by [KatIPAuth]) or your local log files in
plugins/KatIPAuth/LOGS/. Enable debug.verbose: true for detailed information. Discord webhook (if configured) will also send alerts.
Q: How do I reset a player's binding?
- A: Ask an admin to use
/ipreset <player> to reset their UUID-IP binding and kick them. They can then rejoin to bind new credentials. The reset command shows which UUID and IP were removed.
Q: Where are logs stored?
- A: Local logs are stored in
plugins/KatIPAuth/LOGS/ with daily files named yyyy-MM-dd.log. Discord webhooks (if configured) provide real-time alerts.
评论 0
登录后参与评分
还没有评论,来抢沙发吧