Commit Graph
1653 Commits
Author SHA1 Message Date
Wouter Gritter bc55300123 Bump com.puppycrawl.tools:checkstyle to 14.1.0 and fix warnings that were false-negatives before [ci skip]
Checkstyle fixed a bunch of false-negatives; linting errors in the source that should've been caught according to our settings. Rather than updating `checkstyle.xml` to work around these, this commit also properly fixes these checkstyle errors.
2026-09-13 14:01:39 +02:00
21bbf35d1d Adding more options for configuring ping passthrough. (#1870)
* Added 'ALLBUTVERSION' option for ping passthrough.

* Added more configuration options for ping passthrough.

* Updated default velocity.toml

* Add support for the legacy ping passthrough.

* Removed legacy ping passthrough & added config migration

- Bumped config-version to 2.8
- Updated comments and grammar
- Removed legacy ping passthrough in the config

* Cleaned up code to match code style

* Update to latest

* Move ping passthrough into its own section

* Reorder migrations so they occur in the right order.

* Clean up ping passthrough related code.

* Update file dates and cleanup/consolidate ping-passthrough code.

* Update proxy/src/main/java/com/velocitypowered/proxy/config/PingPassthroughMode.java

* Update proxy/src/main/java/com/velocitypowered/proxy/config/PingPassthroughMode.java

* Remaining nits

- Read a string instead of LegacyPingPassthroughMode
- Update `announce-forge`'s comment in `PingPassthroughMigration`
- Consume `Config` instead of `CommentedConfig` in `PingPassthroughMode#fromConfig`

---------

Co-authored-by: TheMiningTeamYT <loanisamazing@outlook.com>
Co-authored-by: ButterDebugger <34288129+ButterDebugger@users.noreply.github.com>
Co-authored-by: Wouter Gritter <wouter@gritter.nl>
2026-09-01 14:49:24 +02:00
Wouter Gritter e84b48a716 Clean up Title packets and enforce action types (#1803) 2026-09-01 13:55:10 +02:00
Wouter Gritter 940f395e3e Use correct minimum ClientSettings packet length for older protocol versions
For correctness's sake: in practice this bug never got triggered because `locale` is almost always a string of length 5+ ("en_us").
2026-09-01 13:19:46 +02:00
Wouter Gritter 4772ca3022 Bump lmbda to 3.0.0, defining generated handlers with the proxy's lookup instead of the plugin's
Reapplies the lmbda 3.0.0 bump reverted in f918d0d6.
2026-08-14 12:53:49 +02:00
Wouter Gritter e6fbcc9196 Various dependency bumps (#1860)
* Bump fastutil to 8.5.19 and remove exclusions

* Various dependency bumps
2026-08-12 18:32:24 +01:00
Radmir Noirusov 14a69904f9 fix: retain reference-counted packets forwarded via handleGeneric (#1856)
During configuration, a ServerboundCustomClickActionPacket arriving
when connectionInFlight is null falls through to handleGeneric, which
writes it to the connected backend without retaining. The encoder
releases the packet, then MinecraftConnection.channelRead's finally
block releases again - double-free.

Two fixes:
- handle() now uses getConnectionInFlightOrConnectedServer() so the
  packet is properly retained before being written
- handleGeneric() retains any ByteBufHolder packet before write, not
  just PluginMessagePacket

Closes #1841
2026-08-12 18:29:30 +01:00
Shane Freeder 00759e5279 Revert "Fix dimension reading for some mods that add extra dimensions in 1.7.10 (#1734)"
This reverts commit 2676520c6a.
2026-08-03 14:09:05 +01:00
Phillipp W. 06ade4775e fix: forward player loaded packet to backend server (#1862)
Return false after handling ServerboundPlayerLoadedPacket so Velocity's normal forwarding path sends the packet to the backend server.
2026-08-03 12:22:58 +01:00
Wouter Gritterandxphorror 2676520c6a Fix dimension reading for some mods that add extra dimensions in 1.7.10 (#1734)
Rewrite the comment and ternary operation to be clearer

Co-authored-by: xphorror <87706197+xphorror@users.noreply.github.com>
2026-08-02 11:13:25 +02:00
e11584ba35 Player Loaded World API (#1541)
Co-authored-by: Emil <12966472+Emilxyz@users.noreply.github.com>
Co-authored-by: Wouter Gritter <wouter@gritter.nl>
2026-07-31 20:03:22 +01:00
AuriandShane Freeder c6e9ca989e Add provides API (#1853)
Add provides API

Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
2026-07-29 12:51:34 +01:00
Emil b45716deff feat: Make version clickable in velocity info command (#1775) 2026-07-19 16:02:20 +02:00
SpigotRCE e653647962 [ci skip] typo fix (#1778) 2026-07-19 16:02:12 +02:00
Shane Freeder 5aab0d1427 [ci skip] primative and functional
oh, my! This stuff is not ideal, but it's the only real protection here unless
we just hack the automation here
2026-07-15 04:28:22 +01:00
Shane Freeder 1cd8d51d02 [ci skip] primative failsafe for mismatched version family 2026-07-15 02:29:29 +01:00
Shane Freeder 9eb338bd1c Fix version family 2026-07-15 02:22:41 +01:00
Andrew Steinborn 60380211f8 Defer ByteBufUtil.getBytes() in config stages until after we check for channel registry 2026-07-14 18:04:07 -04:00
Beanes 28c9f5a356 Small optimization to prevent blocking netty threads on UUID.randomUUID() (#1781)
* Small optimization to prevent blocking netty threads on UUID.randomUUID()

* Change FastRandomUuid to be a valid uuid v4

* Update javadoc for spotless

* Migrate method to VelocityTabListLegacy and add notice that it is insecure

* Bring back deleted override
2026-07-11 22:09:17 +02:00
Wouter Gritter da7427fb51 Set TitleActionbarPacket's default action to SET_ACTION_BAR (#1802) 2026-07-11 22:09:11 +02:00
Wouter Gritter b8d1f16b07 Setup encryption before possible disconnect (#1754) 2026-07-11 22:09:03 +02:00
Wouter Gritter 729a050662 Fix build-time GraalVmProcessor warning (#1801) 2026-07-11 22:08:55 +02:00
Wouter Gritter c690b4abfc Strip pre-java-9 version check in Metrics as Velocity targets 21+ (#1836)
* Strip pre-java-9 version check in `Metrics` as Velocity targets 21+

* Simplify Java version check by using `Runtime.version()` (entry still needs the system property to produce the same bStats metrics)

* Reconstruct `java.version` system property through `Runtime.Version`

* Update `javaVersion()` javadoc

* Newline while we're here
2026-07-11 22:08:47 +02:00
Wouter Gritter 5cc6b0b7e5 Use SecureRandom to generate verification/anti-MITM token (#1797) 2026-07-11 22:08:36 +02:00
Wouter Gritter 757711a5bc Use correct max tab complete lengths for < 1.13, = 1.13 and > 1.13 (#1796) 2026-07-11 22:08:30 +02:00
Emil ffca982a9d chore: drop adventure-platform-facet (#1843) 2026-07-11 02:09:54 +01:00
Shane Freeder 2b5d964ab0 Reapply "Adventure 5 (#1774)"
This reverts commit 06eb052ab5.
2026-07-11 01:36:17 +01:00
Shane Freeder 06eb052ab5 Revert "Adventure 5 (#1774)"
This reverts commit 97b386d86f.
2026-07-11 01:33:41 +01:00
Adrian 97b386d86f Adventure 5 (#1774)
* Adventure 5.2.0
2026-07-10 11:53:08 +01:00
Clement Raynaud 81a5817a82 Resolve backend DNS on a bounded thread pool to avoid head-of-line blocking (#1834)
* Use a bounded thread pool for backend DNS resolution

* Queue DNS lookups instead of rejecting when the resolver pool is busy
2026-07-08 11:27:56 +02:00
Wouter Gritter 1edab1411d Store historical console commands in .console_history (enables command history between restarts) (#1835) 2026-07-05 16:10:22 +01:00
Shane Freeder a7581821fb Use a shared per-proxy session ID for 26.2 login metrics
The 26.2 login success session ID is purely a metrics identifier. Mint
one shared UUID per proxy, regenerated when the proxy empties, mirroring
the vanilla server, instead of a random UUID per connection.
2026-06-16 12:27:00 +01:00
Aaron d7ad0522e9 Minecraft 26.2 (#1807)
* 26.2-snapshot-2

* 26.2-snapshot-3

* 26.2-snapshot-4

* 26.2-pre-1

* 26.2-pre-3

* 26.2-pre-4

* chore: set online mode and session id

* fix: checkstyle

* 26.2-pre-5

* 26.2-pre-6

* 26.2-rc-1

* 26.2-rc-2

* unregister old color argument in 26.2

* 26.2
2026-06-16 12:20:59 +01:00
Wouter Gritter 3b892899db Require non-null reason (#1823) 2026-06-15 15:47:31 +01:00
Wouter Gritter 1b64a70a00 Fix underflow and overflow error messages (#1812) 2026-06-02 16:22:33 +02:00
GoldenEdit 3b142f3099 Fix inverted PluginMessageEvent source/target in InitialConnectSessionHandler (#1811) 2026-05-28 11:02:48 +01:00
Wouter Gritter 25fbd833cd Add decompressed-bytes-per-second rate limit, update packet limiter defaults (#1786)
* Add decompressed-bytes-per-second packet limiter, update defaults
* Revert "Add compression ratio limiter"
2026-05-24 16:59:34 +01:00
Wouter Gritter b72cf26802 Cap pre-join plugin-message queue size (prevents arbitrary growth/OOM) (#1800)
* Cap pre-join plugin-message queue size (prevents arbitrary growth/OOM)

* Clear counters once as the entire queue will have been processed
2026-05-24 16:55:07 +01:00
Wouter Gritter 7d68208e11 Always close HttpClient (#1798)
* Always close HttpClient (even on exception)

* Get rid of try/catch since we now use java 21
2026-05-22 10:25:48 -05:00
Wouter Gritter 38ff21afd7 Fix theoretical IOOBE race (#1799) 2026-05-22 15:50:48 +01:00
Aaron 9c0c9b0218 fix: outdated client message (#1763) 2026-05-09 08:27:52 +01:00
Wouter Gritter ad8de4361c Fix wrong logs in exception(Throwable) (#1784) 2026-05-01 19:13:51 +01:00
Shane Freeder f712997dd7 Seperate client/serverbound payload limits 2026-04-17 21:03:04 +01:00
Shane Freeder a6d97e28ad Validate compression claim 2026-04-13 13:39:57 +01:00
booky 339a4c1887 Fix some small protocol inconsistencies (#1772) 2026-04-12 20:18:42 +01:00
Shane Freeder e834af9cf1 Increase max ratio
Older versions of the game, and creative mode, send itemstacks to the server
when dealing with itemstacks, annoying, the compression algo used is good at
backreferencing, which means that compressed data can balloon pretty well.

64 should more than cover most cases of legit data, we could probably be more
harsh here, but this is likely a fine balance between avoiding bombs and not
erring out on legit data.
2026-04-09 19:04:02 +01:00
Shane Freeder affc1d6e08 Extend debug logging to client play/config handlers 2026-04-09 19:03:33 +01:00
R00tB33rMan 6ce432e4ae Handle configuration/transition-phase disconnects as connection errors to prevent bricking older client versions (#1753) 2026-04-09 15:50:01 +01:00
Harold b1a1b8bda3 use outbound only queueing when reentering configuration (#1747)
* use outbound only queueing and guard serverbound forwarding during reconfiguration
2026-04-08 23:27:02 +01:00
Shane Freeder 6f01587318 Appease checkstyle 2026-04-08 21:19:27 +01:00