Network Security [1.13.x - 1.21.x] ✈️ AntiVPN and AntiProxy [FREE] Velocity/Bungeecord/Spigot/Paper icon

Network Security [1.13.x - 1.21.x] ✈️ AntiVPN and AntiProxy [FREE] Velocity/Bungeecord/Spigot/Paper -----

Security for your Network.




MariaDB and Redis Storage Support Implemented

The storage system now supports MariaDB and Redis, expanding compatibility options for various server environments. These are now available alongside existing storage types.

Configuration Sample (in config.yml)
Code (YAML):
storage :
  # Storage type for cache and player-country tracking.
  # Velocity/Bungee: "json", "mysql", "MariaDB", "Redis"
  # Spigot/Paper/Purpur: "sqlite", "json", "Redis", "MariaDB", "mysql"
  type
: json

  # If using MySQL or MariaDB, uncomment and configure:
  # mysqlHost: localhost
  # mysqlPort: 3306
  # mysqlDatabase: network_security
  # mysqlUser: root
  # mysqlPassword: password123

  # If using Redis, uncomment and configure:
  # redis:
  #   host: "127.0.0.1"
  #   port: 6379
  #   password: ""
 
----------, Jul 13, 2025


- The 2FA verification system via Discord has been improved.
- Now, when a player tries to join from a different IP, they may see an extra ":information_source: More Info" button in Discord.

This button lets the account owner review:
- The IP address of the login attempt
- Country and continent
- Exact login time
- Other accounts linked to the same IP

This information is visible **only** to the verified Discord user. No one else can view it.

# :technologist: For plugin/API developers:
- The `solicitarConfirmacion();` method has been updated to allow optional extra details.
- If data is `null`, the API gracefully falls back to the default confirmation mode (without the details button).

Code (Java):
CompletableFuture <Boolean > confirmacion = DiscordConfirmationAPI. solicitarConfirmacionConDetalles (
    playerUUID,
    ip,                   // null or real
    country,             // null or real
    continent,           // null or real
    attemptTime,         // null or real
    linkedAccounts       // null or real
) ;
Examples:

Code (Java):
String ip = "123.45.67.89" ;
String country = "US" ;
String continent = "North America" ;
String time = LocalTime. now ( ). toString ( ) ;
String accounts = DATABASE. getPlayersLinkedToIP (ip ) ;

DiscordConfirmationAPI
    . solicitarConfirmacionConDetalles (playerUUID, ip, country, continent, time, accounts )
    . thenAccept (confirmed -> {
        if (confirmed ) {
            // ----------
        } else {
            // ----------
        }
    } ) ;
 
Code (Java):
DiscordConfirmationAPI
    . solicitarConfirmacionConDetalles (playerUUID, null, null, null, null, null )
    . thenAccept (confirmed -> {
        if (confirmed ) {
            // OK
        }
    } ) ;
 
----------, Jul 11, 2025

# NEW | Network Security [1.13.x - 1.21.x] :airplane: AntiVPN and AntiProxy [FREE] 2.0.0-BETAv1

Hey everyone!
We're bringing a major update that improves the system's **security** and **organization**. Here's everything you need to know:

━━━━━━━━━━━━━━━━━━━━━━━━━━━
# NEW FEATURES

**2FA Authentication via Discord:**
- You can now link your Minecraft account to Discord.
- Login confirmation with interactive Discord buttons (Yes / No).
- Requests automatically expire after 5 minutes.

**Public Developer API:**
- Retrieve the Discord ID linked to a Minecraft UUID.
- Retrieve the Minecraft UUID linked to a Discord ID.
- Request action confirmation (like login) via Discord.

━━━━━━━━━━━━━━━━━━━━━━━━━━━
# REFACTORING & STRUCTURE

**Storage folder reorganization:**
- SQLite database moved to: `plugins/securitynetwork/storage/sqlite/cache.db`
- JSON files moved to: `plugins/securitynetwork/storage/json/`
- Old data is automatically migrated to the new structure.

━━━━━━━━━━━━━━━━━━━━━━━━━━━
# MULTI-LANGUAGE SUPPORT

Available translations for Discord messages:
- Spanish (es-es)
- Mexican Spanish (es-mx)
- English (en-us)
- Catalan (ca)
- Portuguese (pt-br)
- French (fr-fr)
- Simplified Chinese (zh-cn)

━━━━━━━━━━━━━━━━━━━━━━━━━━━
FOR DEVELOPERS

Use the API to query or manage links:
```java
// Get Discord ID from Minecraft UUID
DiscordLinkAPI.getDiscordIdByMinecraft(UUID playerUUID);

// Get Minecraft UUID from Discord ID
DiscordLinkAPI.getMinecraftUUIDByDiscordId(String discordId);

// Request action confirmation
DiscordConfirmationAPI.solicitarConfirmacion(UUID playerUUID)
.thenAccept(confirmed -> {
if (confirmed) {
// Execute secure action
}
});
```

Demo video:
Download link: https://www.spigotmc.org/resources/...-free-velocity-bungeecord-spigot-paper.116819
----------, Jul 9, 2025

- The plugin has been enhanced with more APIs to better support more monthly players.
- Changes in config.yml
- Currently, the plugin doesn't require a geolocation API to work, but if you're a large server with a lot of traffic, you have the option to use an extra API.
Code (YAML):
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/
Test:
Code (Text):
[19:34:20 INFO] [NetworkSecurity]: === Iniciando test de APIs (VPN y GEO) para IP: 201.--.---.- ===
[19:34:20 INFO] [NetworkSecurity]: >>> Test de servicios VPN/Proxy:
[19:34:21 INFO] [NetworkSecurity]: [ProxyCheck API] Proxy=false
[19:34:21 INFO] [NetworkSecurity]: [IPQualityScore API] Proxy=false
[19:34:21 INFO] [NetworkSecurity]: [IpHub API] Proxy=false
[19:34:21 INFO] [NetworkSecurity]: >>> Test de servicios de Geolocalización:
[19:34:21 INFO] [NetworkSecurity]: [IpWhoIs API] Country=PE, Continent=South America
[19:34:21 INFO] [NetworkSecurity]: [IpInfo API] Country=PE, Continent=South America
[19:34:22 INFO] [NetworkSecurity]: [IpGeolocation API] Country=PE, Continent=South America
[19:34:22 INFO] [NetworkSecurity]: [IpApi API] Country=PE, Continent=South America
[19:34:22 INFO] [NetworkSecurity]: === Fin del test de APIs ===
----------, Jul 8, 2025

Code (YAML):
# 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/..."
Administration Commands, usage "Permission: securitynetwork.admin":
- /ipadmin delete <ip> - Remove an IP from cache
- /ipadmin stats - Show blocked and allowed counts
- /ipadmin wipe - WARNING: Wipe entire database (requires confirmation)

Test command, usage "Only console send": **/ipchecktest <ip>**

FIX:
- Fixed an issue with detecting VPN and PROXY
----------, Jul 7, 2025

This is the correct version, please upload a draft ;-;
----------, Jul 7, 2025

Delete the old plugin and install this new one. All the code has been changed to optimize it and make it more scalable to support it.
----------, Jul 7, 2025

Actualización del Plugin: Seguridad de Networks - Soporte para Modo de Países (Whitelist/Blacklist)

Novedades:
- Soporte para Modo de Países: Ahora puedes alternar entre una lista de países permitidos (whitelist) y una lista de países bloqueados (blacklist) desde el archivo config.yml. Esto te permite controlar de manera más flexible quién puede acceder a tu servidor basado en su ubicación geográfica.

Configuración Simplificada:
Si usas el modo blacklist, se bloquearán los países en la lista country-deny.
Si usas el modo whitelist, solo se permitirá el acceso a los países en la lista country-allow.

Archivo config.yml actualizado: Aquí está el nuevo formato:
Code (YAML):
country-mode : blacklist # Alterna entre "blacklist" y "whitelist"
country-deny
: [AF, AX, AL, DZ ] # Lista de países bloqueados (solo para blacklist)
# country-allow: [US, CA, GB, FR] # Lista de países permitidos (solo para whitelist)
Plugin Update
: Network Security - Country Mode Support (Whitelist/Blacklist )
What's New:
Country Mode Support: You can now toggle between a whitelist and blacklist of countries directly from the config.yml file. This gives you greater flexibility in managing server access based on geographic location.

Simplified Configuration:
In blacklist mode, countries listed in country-deny will be blocked.
In whitelist mode, only countries listed in country-allow will be allowed access.

Updated config.yml File: Here's the new format:
Code (YAML):
country-mode : blacklist # Toggle between "blacklist" and "whitelist"
country-deny
: [AF, AX, AL, DZ ] # Blocked countries (for blacklist only)
# country-allow: [US, CA, GB, FR] # Allowed countries (for whitelist only)
----------, Jan 13, 2025

Recommended to reload the config.yml

1.PlaceholderAPI Integration:
Added 2 PlaceholderAPI variables related to the security system
- %security_country% - Returns the user's country (2-digit code)
- %security_vpn% - returns false/true if you have VPN or PROXY

2. Ban System:
Bans by Nickname and IP:
- Commands were implemented to permanently ban both by nickname and by IP. /bans <IP/Nickname> <Player> <Reason>
- When banning by IP, all players connected to that IP are disconnected.
- Ban messages can be customized from configuration files.

Temporary Ban by Nickname and IP:
- Command /bans tempban <NICK/IP> <duration> <reason> that allows players to be temporarily banned.
- The duration of the ban can be in minutes (m), hours (h), days (d) or years (y). Example: /bans tempban Anyelo120 1h Reason
The expiration time is calculated based on the command and stored in the configuration files.

Temporary Ban Messages:
- Added support for custom temporary ban messages, including the remaining time of the ban.
- When a player tries to connect and is temporarily banned, they receive a message indicating the reason for the ban and the remaining time.

Temporary Ban Verification System:
- If a temporary ban expires, it is automatically removed from the system, allowing the player to log back in.
- If the ban has not yet expired, the player is banned with the corresponding message.

Automatic Reload of the Temporary Bans File:
- Command /bans unban <NICK/IP>:
Allows you to remove a ban, whether permanent or temporary, by nickname or IP.
Once the command is executed, the ban is removed from the configuration files.
----------, Sep 4, 2024

After 2 days of use on my server, I realized that the anti-proxy system was missing something important, a whitelist to avoid excessive use of the API.

New changes:
- A whitelist.yml was implemented to add the IPs that were already allowed on the antivpn and antiproxy.

- Changes were made to the config.yml, important to update the new YML.

With these changes you improve the efficiency of the code and the API.

NEW CONFIG.YML
Code (YAML):
messages:
  ip-blocked
: "Acceso denegado: IP bloqueada. ¿Cree que fue un error? discord: discord.supernovamc.online"
  country-blocked
: "Acceso denegado: Conexiones desde tu país no están permitidas. ¿Cree que fue un error? discord: discord.supernovamc.online"
  suspicious-activity
: "Acceso denegado: Actividad sospechosa detectada. ¿Cree que fue un error? discord: discord.supernovamc.online"
  player-registered
: "Jugador registrado {player} desde {location}."
  login-blocked
: "Intento de inicio de sesión bloqueado para el jugador {player} desde {location}."
  api-switch
: "Cambiando a la siguiente API."
  suspicious-connection
: "ha sido agregada a la lista negra por intentos de inicio de sesión sospechosos."
  allowed-country
: "Ha pasado con exito la revisión de paises permitidos."
  ipRemove-noPermission
: "No tienes permisos para hacer eso..."
  ipRemove
: "IP eliminada correctamente de los archivos y lista negra."
  ipRemove-error
: "IP no encontrada..."
  vpn-proxy-blocked
: "El uso de VPN y PROXY esta prohibido dentro del servidor."
  no-vpn-or-proxy
: "Ha pasado correctamente el sistema antiVPN y antiPROXY."
  add-whitelist
: "IP agregada a la Whitelist."
----------, May 22, 2024

- A new antiVPN and antiPROXY system has been implemented to prevent intruders by camouflaging your IP
- New config.yml
Code (YAML):
# List of blocked countries, this will help prevent VPNs from users and thus have an IP blacklist to not use so many API requests.
# http://country.io/names.json?ref=ipinfo.io
# https://www.iplocation.net/country-codes
country-deny
: [AF, AX, AL, DZ ]

# IMPORTANT: Enter the API-KEY of the pages:
# https://ipgeolocation.io/
# https://ipinfo.io/
api-keys
:
  ipgeolocation
: API-KEY
  ipinfo
: API-KEY
  proxycheck
: API-KEY # anti-proxy and anti-vpn
 
# For the anti-proxy and anti-vpn system to work correctly it must have the
# https://proxycheck.io/ API (obligatory)
detect-vpn-proxy
: false

# Personalize the messages to your liking, if you want to use color code it is with "§"
messages
:
  ip-blocked
: "Acceso denegado: IP bloqueada. ¿Cree que fue un error? discord: discord.supernovamc.online"
  country-blocked
: "Acceso denegado: Conexiones desde tu país no están permitidas. ¿Cree que fue un error? discord: discord.supernovamc.online"
  suspicious-activity
: "Acceso denegado: Actividad sospechosa detectada. ¿Cree que fue un error? discord: discord.supernovamc.online"
  player-registered
: "Jugador registrado {player} desde {location}."
  login-blocked
: "Intento de inicio de sesión bloqueado para el jugador {player} desde {location}."
  api-switch
: "Cambiando a la siguiente API."
  suspicious-connection
: "ha sido agregada a la lista negra por intentos de inicio de sesión sospechosos."
  allowed-country
: "Ha pasado con exito la revisión de paises permitidos."
  ipRemove-noPermission
: "No tienes permisos para hacer eso..."
  ipRemove
: "IP eliminada correctamente de los archivos y lista negra."
  ipRemove-error
: "IP no encontrada..."
  vpn-proxy-blocked
: "El uso de VPN y PROXY esta prohibido dentro del servidor."
  no-vpn-or-proxy
: "Ha pasado correctamente el sistema antiVPN y antiPROXY."

# Permission:
# security.bypass.countryblocked - Prevent country ban review on a player.
# security.bypass.vpn-proxy - Use in case of false positives.
# security.bypass.all - Remove all protections that the addon gives to a player.
# security.command.remove - Permissions to use the command: /security remove IP

# How does this security plugin work?
# When the plugin is enabled:
# - The default configuration (config.yml) is loaded.
# - Player data is loaded from playerData.yml.
# - Load the IP cache from ipCache.yml.
# - Load the IP blacklist from blacklist.yml.
# - Load the API state from apiState.yml.
# - IP geolocation services are initialized with the API keys from config.yml.
# - Custom messages will be loaded from config.yml.
# - Plugin events are logged in Bukkit.

# When a player tries to log in (onPlayerLogin event):
# - The name and IP of the player are obtained.
# - Checks if the player's IP is blacklisted:
# - If present, access is denied with an IP blocked message and a blocked attempt is logged.
# - The country is obtained from the player's IP using cache or geolocation services:
# - If the country is blacklisted, access is denied with a country blocked message,
# The blocked attempt is logged and the IP is added to the blacklist.
# - If the player has already logged in before, it is checked if the country has changed:
# - If the country has changed, access is denied with a suspicious activity message and the blocked attempt is logged.
# - If this is the first time the player logs in, the player's country is recorded.

# When the plugin is disabled:
# - Player data is saved in playerData.yml.
# - The IP cache is saved in ipCache.yml.
# - The blacklist of IPs is saved in blacklist.yml.
# - The state of the API is saved in apiState.yml.

# Additional methods:
# - getCountryFromIP: Gets the country of an IP using cache or geolocation services.
# - switchToNextApi: Switch to the next geolocation service if the current one fails.
# - loadPlayerData / savePlayerData: Load and save player data.
# - loadIPCache / saveIPCache: Load and save the IP cache.
# - loadIPBlacklist / saveIPBlacklist: Load and save the IP blacklist.
# - loadApiState / saveApiState: Load and save the API state.
# - formatMessage: Replaces {player} and {location} markers in custom messages.
- New permission to bypass VPN or PROXY checking for possible false positives.
----------, May 20, 2024

- Two new permissions have been implemented.
- A new command has been implemented.

Permissions:
Code (YAML):
# Permission:
# security.bypass.countryblocked: Prevents checking a player's country ban.
# security.bypass.all - Removes all protections that the plugin provides to a player.
# security.command.remove - Permissions to use the command: /security remove IP
- New command "/security remove IP" Allows you to delete the IP from the blacklist.

- New Config.yml
Code (YAML):
# List of blocked countries, this will help prevent VPNs from users and thus have an IP blacklist to not use so many API requests.
# http://country.io/names.json?ref=ipinfo.io
# https://www.iplocation.net/country-codes
country-deny
: [AF, AX, AL, DZ ]

# IMPORTANT: Enter the API-KEY of the pages:
# https://ipgeolocation.io/
# https://ipinfo.io/
api-keys
:
  ipgeolocation
: API-KEY
  ipinfo
: API-KEY

# Personalize the messages to your liking, if you want to use color code it is with "§"
messages
:
  ip-blocked
: "Acceso denegado: IP bloqueada. ¿Cree que fue un error? discord: discord.supernovamc.online"
  country-blocked
: "Acceso denegado: Conexiones desde tu país no están permitidas. ¿Cree que fue un error? discord: discord.supernovamc.online"
  suspicious-activity
: "Acceso denegado: Actividad sospechosa detectada. ¿Cree que fue un error? discord: discord.supernovamc.online"
  player-registered
: "Jugador registrado {player} desde {location}."
  login-blocked
: "Intento de inicio de sesión bloqueado para el jugador {player} desde {location}."
  api-switch
: "Cambiando a la siguiente API."
  suspicious-connection
: "ha sido agregada a la lista negra por intentos de inicio de sesión sospechosos."
  allowed-country
: "Ha pasado con exito la revisión de paises permitidos."
  ipRemove-noPermission
: "No tienes permisos para hacer eso..."
  ipRemove
: "IP eliminada correctamente de los archivos y lista negra."
  ipRemove-error
: "IP no encontrada..."

# Permission:
# security.bypass.countryblocked - Prevent country ban review on a player.
# security.bypass.all - Remove all protections that the addon gives to a player.
# security.command.remove - Permissions to use the command: /security remove IP

# How does this security plugin work?
# When the plugin is enabled:
# - The default configuration (config.yml) is loaded.
# - Player data is loaded from playerData.yml.
# - Load the IP cache from ipCache.yml.
# - Load the IP blacklist from blacklist.yml.
# - Load the API state from apiState.yml.
# - IP geolocation services are initialized with the API keys from config.yml.
# - Custom messages will be loaded from config.yml.
# - Plugin events are logged in Bukkit.

# When a player tries to log in (onPlayerLogin event):
# - The name and IP of the player are obtained.
# - Checks if the player's IP is blacklisted:
# - If present, access is denied with an IP blocked message and a blocked attempt is logged.
# - The country is obtained from the player's IP using cache or geolocation services:
# - If the country is blacklisted, access is denied with a country blocked message,
# The blocked attempt is logged and the IP is added to the blacklist.
# - If the player has already logged in before, it is checked if the country has changed:
# - If the country has changed, access is denied with a suspicious activity message and the blocked attempt is logged.
# - If this is the first time the player logs in, the player's country is recorded.

# When the plugin is disabled:
# - Player data is saved in playerData.yml.
# - The IP cache is saved in ipCache.yml.
# - The blacklist of IPs is saved in blacklist.yml.
# - The state of the API is saved in apiState.yml.

# Additional methods:
# - getCountryFromIP: Gets the country of an IP using cache or geolocation services.
# - switchToNextApi: Switch to the next geolocation service if the current one fails.
# - loadPlayerData / savePlayerData: Load and save player data.
# - loadIPCache / saveIPCache: Load and save the IP cache.
# - loadIPBlacklist / saveIPBlacklist: Load and save the IP blacklist.
# - loadApiState / saveApiState: Load and save the API state.
# - formatMessage: Replaces {player} and {location} markers in custom messages.
----------, May 20, 2024

- Implemented a new permission to grant to players.
Permission to avoid having to go through the permitted country checker.
security.bypass.countryblocked

- New changes in config.yml
Code (YAML):
messages:
  ip-blocked
: "Acceso denegado: IP bloqueada. ¿Cree que fue un error? discord: discord.supernovamc.online"
  country-blocked
: "Acceso denegado: Conexiones desde tu país no están permitidas. ¿Cree que fue un error? discord: discord.supernovamc.online"
  suspicious-activity
: "Acceso denegado: Actividad sospechosa detectada. ¿Cree que fue un error? discord: discord.supernovamc.online"
  player-registered
: "Jugador registrado {player} desde {location}."
  login-blocked
: "Intento de inicio de sesión bloqueado para el jugador {player} desde {location}."
  api-switch
: "Cambiando a la siguiente API."
  suspicious-connection
: "ha sido agregada a la lista negra por intentos de inicio de sesión sospechosos."
  allowed-country
: "Ha pasado con exito la revisión de paises permitidos."
----------, May 18, 2024

- Now if a user tries to access an account which is not allowed due to the difference in country, if they try more than 3 times in a period of 5 minutes, their IP is added to the blacklist, in this way many requests to the API making it more viable in the long term.

- Changes in config.yml

Code (YAML):
# Personalize the messages to your liking, if you want to use color code it is with "§"
messages
:
  ip-blocked
: "Acceso denegado: IP bloqueada. ¿Cree que fue un error? discord: discord.supernovamc.online"
  country-blocked
: "Acceso denegado: Conexiones desde tu país no están permitidas. ¿Cree que fue un error? discord: discord.supernovamc.online"
  suspicious-activity
: "Acceso denegado: Actividad sospechosa detectada. ¿Cree que fue un error? discord: discord.supernovamc.online"
  player-registered
: "Jugador registrado {player} desde {location}."
  login-blocked
: "Intento de inicio de sesión bloqueado para el jugador {player} desde {location}."
  api-switch
: "Cambiando a la siguiente API."
  suspicious-connection
: "ha sido agregada a la lista negra por intentos de inicio de sesión sospechosos."
----------, May 17, 2024

Resource Information
Author:
----------
Total Downloads: 851
First Release: May 17, 2024
Last Update: Jul 13, 2025
Category: ---------------
All-Time Rating:
3 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings