Commit Graph

108 Commits

Author SHA1 Message Date
funkemunky bacec8c58f Fixing version in plugin manifests 2026-04-30 07:42:58 -04:00
funkemunky 018e466565 Fixing project version 2026-04-30 07:38:52 -04:00
Dawson c95c7b37a1 Correcting Kick Errors on Bukkit-based platforms (#84)
* Forcing BukkitPlayer#kickPlayer to always run within a main thread context using BukkitRunnable. Bumping version to 1.10.1

* Fixing async kick error, adding condition that allows players to be whitelisted even while they are offline (assuming this is not a cracked server).

* Updating gradle piplines and files

* correcting startup bug as a result of a packaging issue

* Fixing asynchronous run command

* Adds a regression test to ensure this doesnt happen again
2026-04-28 21:30:35 -04:00
funkemunky 775d29114a Revert "Adding postgres"
This reverts commit ee07deb68f.
2026-04-17 09:43:56 -04:00
funkemunky ee07deb68f Adding postgres 2026-04-10 13:46:57 -04:00
Dawson 1acdfe8c4b Added automated testing (#82)
* Using built in pipeline

* Added testing for databases, and fixed some potential database bugs

* Fixing MySQL issues

* Adding central test suite

* Updating test workflow to build without tests and one with tests
2026-04-08 21:29:37 -04:00
Dawson 57109e4c97 Feature/gradle refactor (#80)
* Gradle project refactor

* Updating workflows for github

* Attempting to fix workflows

* Fixing maven central proxy

* Fixing missing dependency in velocity

* Fixing build

* Getting rid of universal submodule

* Updating workflows to handle new build structure, removing maven workflows

* Fixing permissions issues caused by gradle files being handled on Windows

* Revert "Fixing permissions issues caused by gradle files being handled on Windows"

This reverts commit 3e4d8be955.

* replacing instances of gradlew

* Adding gradlew wrapper

* Attempting to fix gradle issues

* Attempting to fix gradle issues

* Adding back ssl args

* Using built in pipeline
2026-04-08 15:27:06 -04:00
funkemunky 5792b81cb1 Correcting logic bug with getDatabaseType function, removing unnecessary function in StringUtil 2026-01-27 10:27:56 -05:00
funkemunky 17cbed8bda Standarized logging calls across platforms 2026-01-27 10:25:47 -05:00
funkemunky e09217877c Update platform listeners to ensure consistent kick functionality 2026-01-27 10:25:03 -05:00
funkemunky 7ffba38992 Improved performance of kicking players, will not allow players to remain on if API tells us we should block them. 2026-01-20 09:44:30 -05:00
funkemunky 8a4b86c9ef Allowlist functionality is now working, corrected sql errors 2026-01-14 09:42:20 -05:00
funkemunky ac57a540c2 Adding copyright headers 2026-01-05 10:27:59 -05:00
funkemunky 9f7f4b40f0 Implementing database versioning for CIDR whitelisting 2026-01-05 09:24:21 -05:00
funkemunky 58395bb705 Merge branch 'master' into 57-feature-allow-subnets-to-be-whitelisted
# Conflicts:
#	Bukkit/Plugin/src/main/java/dev/brighten/antivpn/bukkit/BukkitPlugin.java
#	Bukkit/pom.xml
#	Bungee/BungeePlugin/src/main/java/dev/brighten/antivpn/bungee/BungeePlugin.java
#	Bungee/pom.xml
#	Common/Source/src/main/java/dev/brighten/antivpn/database/Database.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/VPNDatabase.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/local/H2VPN.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/mongo/MongoVPN.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/mongodb/MongoDatabase.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/mongodb/records/AlertsUser.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/mongodb/records/CidrWhitelist.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/mongodb/records/UserIpResponse.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/mongodb/records/UserWhitelist.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/postgres/PostgresDatabase.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/sql/MySqlVPN.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/sql/utils/ExecutableStatement.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/sql/utils/MySQL.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/sql/utils/NonClosableConnection.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/sql/utils/Query.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/sql/utils/ResultSetIterator.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/sqllite/LiteDatabase.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/sqllite/version/Version.java
#	Common/Source/src/main/java/dev/brighten/antivpn/database/sqllite/version/impl/First.java
#	Common/Source/src/main/java/dev/brighten/antivpn/utils/CIDRUtils.java
#	Common/Source/src/main/java/dev/brighten/antivpn/utils/IpUtils.java
#	Common/pom.xml
#	Sponge/pom.xml
#	Universal/pom.xml
#	Velocity/VelocityPlugin/src/main/java/dev/brighten/antivpn/velocity/VelocityListener.java
#	Velocity/VelocityPlugin/src/main/java/dev/brighten/antivpn/velocity/VelocityPlugin.java
#	Velocity/pom.xml
#	pom.xml
2025-12-12 06:56:23 -08:00
funkemunky c95c9bb8f3 Near final staged for refactor 2025-12-04 14:19:02 -05:00
funkemunky 606144d404 Start of project restructure to use a JarInJarClassLoader 2025-12-02 10:24:38 -05:00
funkemunky 7b3174eaae Updating to 1.9.4 2025-09-30 08:38:23 -04:00
funkemunky edd255e29d Added mongodb and option to remove spoiled cached responses 2025-06-05 11:35:15 -04:00
funkemunky 9697150465 Added postgresql 2025-06-05 10:24:45 -04:00
funkemunky bb3a31e100 CIDR Support setup and implemeneted for adding/removing via command, and checking updates for CIDR implemented. Also fixed problem with SHA-algor not being present 2025-05-30 18:10:08 -04:00
funkemunky 83f06b29c8 Merge branch 'master' into 57-feature-allow-subnets-to-be-whitelisted
# Conflicts:
#	Bukkit/pom.xml
#	Bungee/pom.xml
#	Bungee/src/main/java/dev/brighten/antivpn/bungee/BungeeListener.java
#	Common/pom.xml
#	Common/src/main/java/dev/brighten/antivpn/AntiVPN.java
#	Common/src/main/java/dev/brighten/antivpn/api/VPNExecutor.java
#	Common/src/main/java/dev/brighten/antivpn/database/local/H2VPN.java
#	Common/src/main/java/dev/brighten/antivpn/database/mongo/MongoVPN.java
#	Common/src/main/java/dev/brighten/antivpn/database/sql/MySqlVPN.java
#	Common/src/main/java/dev/brighten/antivpn/database/sql/utils/MySQL.java
#	Common/src/main/java/dev/brighten/antivpn/database/sql/utils/Query.java
#	Common/src/main/java/dev/brighten/antivpn/utils/StringUtil.java
#	Sponge/pom.xml
#	Universal/pom.xml
#	Velocity/pom.xml
#	Velocity/src/main/java/dev/brighten/antivpn/velocity/VelocityListener.java
#	pom.xml
2025-05-28 21:19:55 -04:00
funkemunky 7247341693 Got initial sponge powered loading working, Im not sure the consequences of it though 2025-05-27 19:39:27 -04:00
funkemunky 3f6bb4a0e6 Refactor, code cleanup, sponge impl.
BungeeCord still has problems, bad API, not my fault technically. still need to fix though
2025-05-27 13:13:53 -04:00
Dawson ea33a34b3d Shrinking Jar File Size Again (#64)
* Adding back dynamic library support and adding some metrics, velocity first

* Removing guava, using caffiene instead

* Merge cleanup

* Maybe this will get caches working properly now?

* Refactored to be more clean and reliable

* Fixing bungee compile

---------

Co-authored-by: Dawson <dawson@funkemunky.cc>
2025-05-12 11:20:23 -04:00
Dawson 2b7f043eb9 Improving shutdown and error handling (#63)
Co-authored-by: Dawson <dawson@funkemunky.cc>
2025-04-22 12:07:30 -04:00
Dawson 2dbe465b9e Fixing Bukkit player kicking not functioning properly (#62)
* Fixing bug where player is not kicked when using proxy on Bukkit servers

* Removing from PlayerLoginEvent and doing PlayerJoinEvent only instead.

---------

Co-authored-by: Dawson <dawson@funkemunky.cc>
2025-04-22 09:58:46 -04:00
Dawson 3aae8d8f49 Backing up and resetting database on versioning compatibility (#61)
Co-authored-by: Dawson <dawson@funkemunky.cc>
2025-04-22 09:54:43 -04:00
Dawson 9cbeed1df3 58-bug-plugin-fails-to-load-after-upgrading-to-193-on-velocity (#60)
* Moving to previous H2 version that was in 1.9.2 that somehow got downgraded

* Reverting back to Java 8 compile target

* removing minimize on shade for Common

* Clearly something here changed something, cause reverting it this way seems to have fixed it

* Cleaning up code here

---------

Co-authored-by: Dawson <dawson@funkemunky.cc>
2025-03-27 10:44:34 -04:00
funkemunky 069142a06b Version 2.0.0-SNAPSHOT: Updated to use SQLLite with versioning. Needed a recode of the database system to allow for future updates. 2025-02-01 10:45:53 -05:00
Dawson 353b7dad78 bugfix/velocity-kick (#56)
* Updating velocity API

* Added exception logging and fixed NullPointerException with antivpn plan command in velocity from tab-complete being null. Replaced MySQL with MariaDB driver

* Added exception logging and fixed NullPointerException with antivpn plan command in velocity from tab-complete being null. Replaced MySQL with MariaDB driver.

* Added exception logging and fixed NullPointerException with antivpn plan command in velocity from tab-complete being null. Replaced MySQL with MariaDB driver.

* Fixing kick reason

* Corrected MySQL ssl errors and fixed visual bug with velocity users kicking

* Reverted to mysql driver

---------

Co-authored-by: Dawson <dawson@funkemunky.cc>
2025-01-26 14:56:12 -05:00
funkemunky 3f5ab39877 - Correct command concurrency issues on Bukkit servers
- Removed dynamic class loading of libraries to fix antivirus flags of the plugin.
2024-03-15 11:06:49 -04:00
funkemunky b2fcc4ff26 Changing event priority on bungee so KauriVPN checks run before anything else. 2024-01-25 13:24:51 -05:00
funkemunky 5b6d214e6f Patches bug on Bukkit/Spigot servers may result in some players not being kicked on VPN detection.
I believe this occurs when the API response is below 50ms, and we attempt to Player#kickPlayer() or run commands on console that attempt to kick the player. The problem is that if this is running before the tick PlayerLoginEvent runs on ends, the player wouldn't be considered "online". Therefore, the player would never be removed from the server even if desired.

I assumed wrongly that the async processing of the query would always end up on the next tick. So now I update the PlayerLoginEvent result to KICK_BANNED no matter if the processing is async or in the same thread stack as the event.
2023-12-30 14:06:44 -05:00
funkemunky 2bdd7d2c34 Cleaned up files 2023-12-04 08:55:01 -05:00
funkemunky 31a9412c0a Updated libraries, and cleaned up code for performance purposes. 2023-12-04 08:54:48 -05:00
Dawson Hessler d224efce3c Updating depends to make it work 2023-10-30 10:12:14 -04:00
C0D3 M4513R dde81b0495 Bump version 2023-07-14 13:35:50 +02:00
Dawson Hessler 96e48594d8 Fixing velocity loading issues 2023-07-12 08:45:39 -04:00
Dawson Hessler 4bda24f10c Bump to 1.9.0 2023-07-06 20:26:02 -04:00
Dawson Hessler c54e90dca1 Removing usages of System.out.print 2023-07-06 20:13:47 -04:00
Dawson Hessler 40308869c0 1.8.4 Added cache for logins for faster response 2023-05-23 08:09:41 -04:00
Dawson Hessler 6959f35d0c Fixing whitelist issues in bukkit and bungee 2023-04-18 06:45:28 -04:00
Dawson Hessler 21b6924cce Fixing error with inserted type mismatch in H2 and MySQL 2023-04-18 06:42:07 -04:00
Dawson Hessler 9c843cd061 Updating to 1.8.3.1
Turns out we accidentally already used the 1.8.3 version
2023-03-13 15:08:04 -04:00
Dawson Hessler 91a09f6940 Updating version to 1.8.3 2023-03-13 15:04:14 -04:00
Dawson Hessler 14e266b978 Fixing load issue with snakeyaml on 1.12+ servers 2022-09-02 09:34:47 -04:00
Dawson Hessler bf5b81b750 1.8.2.1, fixed H2 and removed debug 2022-08-29 07:19:42 -04:00
Dawson Hessler 9dc312186b Shrunk jar file size, fixed errors, added database reload
- Fixed H2 database error on index creation when loading plugin by using dynamic library downloader/loader from Lucko's Helper.
- Shrunk jar file size extensively so it can be uploaded to Spigot directly.
- Updated h2database driver to 2.1.214 to patch vulnerability
- Updated mysql database driver to 8.0.30 to patch vulnerability
- Updated MongoDB java driver to 3.12.11.
2022-08-28 13:14:13 -04:00
Dawson Hessler 0048cf6b8c 1.8.2 2022-08-28 12:12:24 -04:00