Discord:
JAVA 11+
兼容:Spigot、Paper、Purpur、BungeeCord 和 Velocity
Velocity 需要 jsmysqlfix-velocity 插件
管理命令 (需要权限: securitynetwork.admin):
- /ipadmin delete <ip> : 从缓存中移除一个 IP
- /ipadmin stats : 显示被屏蔽和允许的 IP 数量
- /ipadmin wipe : 清除整个数据库(需要确认)
权限
- securitynetwork.bypass.vpn: 绕过 VPN 检查。
- securitynetwork.bypass.country: 绕过国家检查。
- securitynetwork.bypass.continent: 绕过大洲检查。
- securitynetwork.bypass.all: 绕过所有检查。
Discord 权限
- securitynetwork.discord.link: 允许使用 /vincular-discord 命令。
- securitynetwork.discord.unlink: 允许使用 /desvincular-discord 命令。
存储方式
- JSON: 将数据存储在本地 JSON 文件中(cache.json 和 player_country.json)。
- MySQL/SQLite: 将数据存储在数据库中。
配置文件
剧透
bot-config.properties
bot.token=TU_TOKEN_AQUI
bot.channelId=ID_DEL_CANAL
Config.yml
# ===============================
# SecurityNetwork - 配置
# ===============================
# 此文件允许你通过过滤代理使用、国家或大洲来控制谁可以加入服务器。
# 你可以使用最多 3 个不同的 API 来检测 IP。
# -------------------------------
# 有用的 API 文档:
# - ProxyCheck.io: https://proxycheck.io/
# - IpInfo: https://ipinfo.io/
# - IPGeolocation: https://ipgeolocation.io/
#
# 国家代码 (ISO 3166-1 alpha-2): https://www.iban.com/country-codes
# 有效的大洲名称:Africa, Antarctica, Asia, Europe, North America, Oceania, South America
# ===============================
lang: es-es
api:
# IP 检测服务的 API 密钥。
# 如果你不想使用某个服务,请留空其 API 密钥。
# ===============================
# VPN 和代理 - 配置
# ===============================
proxycheck: your-proxycheck-key # https://proxycheck.io/
ipHub: your-proxycheck-key # https://iphub.info/
ipQualityScore: your-proxycheck-key # https://www.ipqualityscore.com/
# ===============================
# 地理定位器 - 配置(非必需)
# ===============================
ipinfo: your-ipinfo-token # https://ipinfo.io/
ipgeolocation: your-ipgeolocation-key # https://ipgeolocation.io/
# 关于阻止尝试以下行为的用户的警报:
# - 接管账户
# - 使用 VPN 或代理
# - 不允许的国家
# - 不允许的大洲
webhook:
discord: "https://discord.com/api/webhooks/..."
countries:
# 定义国家过滤器的工作方式:
# - "blacklist"(黑名单):仅阻止下面列出的国家。
# - "whitelist"(白名单):仅允许下面列出的国家。
mode: blacklist
list:
- US # 美国
- RU # 俄罗斯
continents:
# 定义大洲过滤器的工作方式:
# - "blacklist"(黑名单):仅阻止下面列出的大洲。
# - "whitelist"(白名单):仅允许下面列出的大洲。
mode: whitelist
list:
- Europe
- South America
storage:
# 用于缓存和玩家-国家跟踪的存储类型。
# Velocity/Bungee: "json", "mysql" <- 可用
# Spigot/Paper/Purpur: "sqlite", "json" 或 "mysql" <- 可用
type: json
# 如果使用 MySQL,请取消注释并配置以下内容:
# mysqlHost: localhost
# mysqlPort: 3306
# mysqlDatabase: network_security
# mysqlUser: root
# mysqlPassword: password123
EN-US.lang
ip.blocked.temp=§c⚠ 你的 IP 暂时被屏蔽。\n§7检查服务器 Discord 以确认你的身份。
ip.blocked=§c由于安全措施拒绝访问。\n§e认为这是错误? -> gg/gatitos
command.link.only-player=§c只有玩家才能使用此命令。
command.link.usage=§e用法: /link-discord <discord_name>
command.link.success=§7{0}
command.unlink.only-player=§c只有玩家才能使用此命令。
command.unlink.success=§7{0}
command.test.only-console=§c此命令只能从控制台运行。
command.admin.no-permission=§c你没有权限使用此命令。
command.admin.usage.delete=§c用法: /ipadmin delete <ip>
command.admin.usage.wipe=§c用法: /ipadmin wipe confirm
command.admin.ip-removed=§aIP {0} 已从缓存中移除。
command.admin.stats.title=§6--- IP 统计 ---
command.admin.stats.blocked=§c已屏蔽: §f{0}
command.admin.stats.allowed=§a已允许: §f{0}
command.admin.wipe.success=§4所有数据已从数据库中清除。
command.admin.wipe.failed=§c清除失败。请再试一次。
command.admin.unknown-subcommand=§c未知子命令。请使用: delete, stats, wipe
command.admin.help.header=§e用法:
command.admin.help.delete=§7/ipadmin delete <ip> - 从缓存中移除一个 IP
command.admin.help.stats=§7/ipadmin stats - 显示被屏蔽和允许的 IP 数量
command.admin.help.wipe=§7/ipadmin wipe - 警告!将清除整个数据库(需要确认)
command.test.usage=§e用法: /ipchecktest <ip>
command.test.success=§a命令对 IP {0} 执行成功
command.test.error=§c执行命令时出错: {0}
uuid.missing=§c无法获取玩家 UUID。\n§e认为这是错误? -> gg/gatitos
ip.missing=§c无法获取玩家 IP。\n§e认为这是错误? -> gg/gatitos
webhook.prefix.time=`[{0}]`
webhook.message.blocked=玩家 `{0}` 已被屏蔽。
webhook.reason.country-continent=由于受限制的国家或大洲而被屏蔽。\n国家: {0}\n大洲: {1}
webhook.reason.early-block=因国家/大洲限制而提前屏蔽。\n国家: {0}\n大洲: {1}
webhook.reason.proxy=因使用 VPN 或代理而阻止连接。\nIP: {0}\nUUID: {1}
webhook.reason.mismatch=可能的账户被盗:检测到国家不匹配。
discord.link.sent=✔ 请求已发送至 Discord。等待确认。
discord.link.not-found=❌ 未找到用户:{0}
discord.link.invalid-channel=❌ 无效的 Discord 频道。
discord.link.message=? <@{0}>,您有一个链接请求。点击接受以与 Minecraft UUID `{1}` 进行绑定
discord.link.expired=❌ 绑定请求已过期。
discord.unlink.requested=✔ 解绑请求已发送至 Discord。等待确认。
discord.unlink.not-linked=❌ 您的 Minecraft 账号尚未绑定。
discord.unlink.error=⚠ 检索绑定信息时出错。
discord.unlink.not-found=⚠ 未找到已绑定的用户。
discord.unlink.message=⚠ <@{0}>,您是否要**解绑**您的 Minecraft 账号?
discord.unlink.expired=⌛ 解绑请求已过期。
discord.confirmation.message=?️ <@{0}> 有人正尝试登录您的账号。是您本人吗?
discord.confirmation.expired=⌛ 确认请求已过期。
discord.confirmation.response=感谢您的回复。
discord.confirmation.error=❌ 无法删除身份验证消息。
discord.confirmation.no-link=❌ 未找到与此账号绑定的任何 Discord 用户。
discord.confirmation.channel-error=❌ 无法发送确认请求。请检查您的频道配置。
discord.confirmation.yes=是
discord.confirmation.no=否
discord.accept.expired=❌ 此请求已过期。
discord.accept.unauthorized=⚠ 您无权接受此请求。
discord.accept.already-linked=❌ 此 Minecraft 账号已绑定。
discord.accept.already-used=❌ 此 Discord 用户已绑定到其他账号。
discord.accept.success=✔ 绑定完成!
discord.accept.error=❌ 无法删除确认消息。
discord.unlink.confirm.success=✔ 您的账号已解绑。
discord.unlink.confirm.error=⚠ 解绑您的账号时出现问题。
discord.unlink.confirm.unauthorized=⚠ 只有已绑定的用户才能确认此操作。
使用方法 (SPIGOT/PAPER/PURPUR)
- 运行您的服务器 (Spigot 或 Paper):
- 启动服务器并享受 NetworkSecurity 带来的增强安全性。
插件将自动检查 IP 地址的代理、国家和大洲信息,以提升服务器安全性。
使用方法 (BUNGEECORD)
- 安装插件:
将 NetworkSecurity.jar 文件放入您的 plugins 目录中。
- 配置插件:
编辑 config.yml 文件以设置 ProxyCheck、IpInfo 和 IPGeolocation 的 API 密钥。
配置黑名单国家和大洲。
BungeeCord 仅支持 MySQL 和 JSON 存储。请在 config.yml 中选择您的存储类型。
- 运行您的 BungeeCord 服务器:
启动 BungeeCord 服务器,NetworkSecurity 插件将根据 IP、国家、大洲和 VPN 状态开始监控并阻止用户。
使用方法 (VELOCITY)
- 安装插件:
将 NetworkSecurity.jar 文件放入您的 plugins 目录中。
- 配置插件:
编辑 config.yml 文件以配置 ProxyCheck、IpInfo 和 IPGeolocation 的 API 密钥。
设置您要阻止的国家和大洲,并管理绕过权限。
- 依赖项:
Velocity 需要 jsmysqlfix-velocity 依赖项才能启用 MySQL 支持,因为 Velocity 本身不带内置 SQL 驱动程序。
下载 jsmysqlfix-velocity 插件并与 NetworkSecurity 一起安装以支持 MySQL。
- 运行您的 Velocity 服务器:
启动 Velocity 服务器,NetworkSecurity 将通过检查用户的国家、大洲和 VPN 状态来增强您的安全性,阻止不必要的访问。
Discord:
JAVA 11+
Compatible with: Spigot, Paper, Purpur, BungeeCord and Velocity
Velocity requires jsmysqlfix-velocity plugin
Administration Commands (Requires: securitynetwork.admin):
- /ipadmin delete <ip> : Remove an IP from cache
- /ipadmin stats : Show blocked and allowed IP counts
- /ipadmin wipe : Wipe the entire database (confirmation required)
Permissions
- securitynetwork.bypass.vpn: Bypass VPN check.
- securitynetwork.bypass.country: Bypass country check.
- securitynetwork.bypass.continent: Bypass continent check.
- securitynetwork.bypass.all: Bypass all checks.
Discord Permissions
- securitynetwork.discord.link: Allows using the /vincular-discord command.
- securitynetwork.discord.unlink: Allows using the /desvincular-discord command.
Storage
- JSON: Stores data in local JSON files (cache.json and player_country.json).
- MySQL/SQLite: Stores data in databases.
Configs
Spoiler
bot-config.properties
bot.token=TU_TOKEN_AQUI
bot.channelId=ID_DEL_CANAL
Config.yml
# ===============================
# SecurityNetwork - Configuration
# ===============================
# This file allows you to control who can join the server
# by filtering based on proxy use, country, or continent.
# You can use up to 3 different APIs to detect IPs.
# -------------------------------
# Useful API documentation:
# - ProxyCheck.io: https://proxycheck.io/
# - IpInfo: https://ipinfo.io/
# - IPGeolocation: https://ipgeolocation.io/
#
# Country codes (ISO 3166-1 alpha-2): https://www.iban.com/country-codes
# Valid continent names used: Africa, Antarctica, Asia, Europe, North America, Oceania, South America
# ===============================
lang: es-es
api:
# API keys for the IP detection services.
# Leave an API blank if you don’t want to use it.
# ===============================
# VPN Y PROXY - Configuration
# ===============================
proxycheck: your-proxycheck-key # https://proxycheck.io/
ipHub: your-proxycheck-key # https://iphub.info/
ipQualityScore: your-proxycheck-key # https://www.ipqualityscore.com/
# ===============================
# GEOLOCALIZADORES - Configuration (not mandatory)
# ===============================
ipinfo: your-ipinfo-token # https://ipinfo.io/
ipgeolocation: your-ipgeolocation-key # https://ipgeolocation.io/
# Alerts about blocking users who attempt to:
# - Take over accounts
# - Use VPN or proxy
# - Not allowed country
# - Not allowed continent
webhook:
discord: "https://discord.com/api/webhooks/..."
countries:
# Defines how the country filter works:
# - "blacklist": blocks ONLY the countries listed below.
# - "whitelist": allows ONLY the countries listed.
mode: blacklist
list:
- US # United States
- RU # Russia
continents:
# Defines how the continent filter works:
# - "blacklist": blocks ONLY the continents listed below.
# - "whitelist": allows ONLY the continents listed.
mode: whitelist
list:
- Europe
- South America
storage:
# Storage type for cache and player-country tracking.
# Velocity/Bungee: "json", "mysql" <- AVAILABLE
# Spigot/Paper/Purpur: "sqlite", "json" or "mysql" <- AVAILABLE
type: json
# If using MySQL, uncomment and configure the following:
# mysqlHost: localhost
# mysqlPort: 3306
# mysqlDatabase: network_security
# mysqlUser: root
# mysqlPassword: password123
EN-US.lang
ip.blocked.temp=§c⚠ Your IP is temporarily blocked.\n§7Check the server Discord to confirm your identity.
ip.blocked=§cAccess denied due to security measures.\n§eThink this is a mistake? -> gg/gatitos
command.link.only-player=§cOnly players can use this command.
command.link.usage=§eUsage: /link-discord <discord_name>
command.link.success=§7{0}
command.unlink.only-player=§cOnly players can use this command.
command.unlink.success=§7{0}
command.test.only-console=§cThis command can only be run from the console.
command.admin.no-permission=§cYou don't have permission to use this command.
command.admin.usage.delete=§cUsage: /ipadmin delete <ip>
command.admin.usage.wipe=§cUsage: /ipadmin wipe confirm
command.admin.ip-removed=§aIP {0} has been removed from cache.
command.admin.stats.title=§6--- IP Statistics ---
command.admin.stats.blocked=§cBlocked: §f{0}
command.admin.stats.allowed=§aAllowed: §f{0}
command.admin.wipe.success=§4All data was wiped from the database.
command.admin.wipe.failed=§cWipe failed. Please try again.
command.admin.unknown-subcommand=§cUnknown subcommand. Use: delete, stats, wipe
command.admin.help.header=§eUsage:
command.admin.help.delete=§7/ipadmin delete <ip> - Remove an IP from cache
command.admin.help.stats=§7/ipadmin stats - Show blocked and allowed IP counts
command.admin.help.wipe=§7/ipadmin wipe - WARNING! Wipes the entire database (requires confirmation)
command.test.usage=§eUsage: /ipchecktest <ip>
command.test.success=§aCommand executed successfully for IP: {0}
command.test.error=§cError while executing the command: {0}
uuid.missing=§cCould not retrieve player UUID.\n§eThink this is a mistake? -> gg/gatitos
ip.missing=§cCould not retrieve player IP.\n§eThink this is a mistake? -> gg/gatitos
webhook.prefix.time=`[{0}]`
webhook.message.blocked=Player `{0}` has been blocked.
webhook.reason.country-continent=Blocked due to restricted country or continent.\nCountry: {0}\nContinent: {1}
webhook.reason.early-block=Early block due to country/continent restrictions.\nCountry: {0}\nContinent: {1}
webhook.reason.proxy=Connection blocked for using VPN or proxy.\nIP: {0}\nUUID: {1}
webhook.reason.mismatch=Possible account theft: country mismatch detected.
discord.link.sent=✔ Request sent to Discord. Waiting for confirmation.
discord.link.not-found=❌ Could not find the user: {0}
discord.link.invalid-channel=❌ Invalid Discord channel.
discord.link.message=? <@{0}>, you have a linking request. Click accept to link with Minecraft UUID `{1}`
discord.link.expired=❌ The linking request has expired.
discord.unlink.requested=✔ Unlink request sent to Discord. Waiting for confirmation.
discord.unlink.not-linked=❌ Your Minecraft account is not linked.
discord.unlink.error=⚠ Error retrieving the link.
discord.unlink.not-found=⚠ Could not find the linked user.
discord.unlink.message=⚠ <@{0}>, do you want to **unlink** your Minecraft account?
discord.unlink.expired=⌛ The unlink request has expired.
discord.confirmation.message=?️ <@{0}> Someone is trying to log into your account. Is it you?
discord.confirmation.expired=⌛ Confirmation request expired.
discord.confirmation.response=Thank you for your response.
discord.confirmation.error=❌ Could not delete the authentication message.
discord.confirmation.no-link=❌ No Discord user linked to this account was found.
discord.confirmation.channel-error=❌ Could not send confirmation request. Check your channel configuration.
discord.confirmation.yes=Yes
discord.confirmation.no=No
discord.accept.expired=❌ This request has already expired.
discord.accept.unauthorized=⚠ You are not authorized to accept this request.
discord.accept.already-linked=❌ This Minecraft account is already linked.
discord.accept.already-used=❌ This Discord user is already linked to another account.
discord.accept.success=✔ Linking complete!
discord.accept.error=❌ Could not delete the confirmation message.
discord.unlink.confirm.success=✔ Your account has been unlinked.
discord.unlink.confirm.error=⚠ There was an issue unlinking your account.
discord.unlink.confirm.unauthorized=⚠ Only the linked user can confirm this.
How to Use (SPIGOT/PAPER/PURPUR)
- Run Your Server (Spigot or Paper):
- Start your server and enjoy enhanced security with NetworkSecurity.
The plugin will automatically check IP addresses for proxies, countries, and continents to improve server security.
How to Use (BUNGEECORD)
- Install the Plugin:
Place the NetworkSecurity.jar file in your plugins directory.
- Configure the Plugin:
Edit the config.yml file to set your API keys for ProxyCheck, IpInfo, and IPGeolocation.
Configure the blacklisted countries and continents.
BungeeCord only supports MySQL and JSON storage. Choose your storage type in the config.yml.
- Run Your BungeeCord Server:
Start your BungeeCord server, and the NetworkSecurity plugin will begin to monitor and block users based on IP, country, continent, and VPN status.
How to Use (VELOCITY)
- Install the Plugin:
Place the NetworkSecurity.jar file in your plugins directory.
- Configure the Plugin:
Edit the config.yml file to configure your API keys for ProxyCheck, IpInfo, and IPGeolocation.
Set up the countries and continents you want to block and manage the bypass permissions.
- Dependencies:
Velocity requires the jsmysqlfix-velocity dependency to enable MySQL support, as Velocity does not come with an inbuilt SQL driver.
Download the jsmysqlfix-velocity plugin and install it alongside NetworkSecurity for MySQL support.
- Run Your Velocity Server:
Start your Velocity server, and NetworkSecurity will enhance your security by checking the country, continent, and VPN status of the users, blocking unwanted access.
评论 0
登录后参与评分
还没有评论,来抢沙发吧