13
0
geforkt von Mirrors/Velocity
Commit graph

707 Commits

Autor SHA1 Nachricht Datum
Andrew Steinborn
46e92a069b Fix an issue with too short not breaking the loop 2020-05-31 14:01:27 -04:00
Andrew Steinborn
f27aa8e3ba Handle empty packets too 2020-05-31 09:54:47 -04:00
Andrew Steinborn
c856635ac5 Try two, with improved state maintenance and some bugs fixed 2020-05-31 08:14:33 -04:00
Andrew Steinborn
3a8ba76f25 This did not work :( 2020-05-31 07:55:19 -04:00
Andrew Steinborn
869f2a6b32 Merge branch 'dev/1.1.0' into decode-multiple 2020-05-29 21:37:10 -04:00
Andrew Steinborn
e83662e8c3 Clean up imports and remove some legacy declarations. 2020-05-29 21:36:58 -04:00
Andrew Steinborn
11fb5f2be3 Simplify the discard logic. 2020-05-29 21:35:07 -04:00
Andrew Steinborn
dd2e1ad241 Handle partially sent varints better 2020-05-29 21:11:21 -04:00
Andrew Steinborn
b6f1dcc166 Optimize varint frame decoding again
Use ByteProcessor in a controlled matter in one specific case. Performance measurements with my Ryzen 5 3600 indicate a 25-35% improvement in time spent framing incoming packets.
2020-05-29 20:52:04 -04:00
Andrew Steinborn
9f6d8e1840 Merge branch 'dev/1.1.0' into decode-multiple 2020-05-29 19:03:03 -04:00
Andrew Steinborn
cb99b184ed Allow plugins to mutate available commands sent to the client.
This is the first unstable API being introduced and is primarily to get feedback on the system.
2020-05-28 07:14:49 -04:00
Andrew Steinborn
d66766a38b Merge branch 'dev/1.1.0' into decode-multiple 2020-05-26 05:25:11 -04:00
Andrew Steinborn
eeb660ce00 Fix bad ordering 2020-05-26 05:25:03 -04:00
Andrew Steinborn
0d1acdb056 Merge branch 'dev/1.1.0' into decode-multiple 2020-05-25 16:09:19 -04:00
Andrew Steinborn
ebad3d1005 Use Integer.MIN_VALUE for the sentinel for readVarIntSafely() 2020-05-25 16:05:36 -04:00
Andrew Steinborn
d7bbe7531a Additional protocol hardening. 2020-05-25 15:58:52 -04:00
Andrew Steinborn
62d3f61a77 Merge branch 'dev/1.1.0' into decode-multiple
# Conflicts:
#	proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java
2020-05-25 13:27:44 -04:00
Andrew Steinborn
abd81a0216 Fix Checkstyle errors. 2020-05-25 13:24:41 -04:00
Andrew Steinborn
0cb4c02107 Run all commands on a separate thread pool. 2020-05-25 13:09:04 -04:00
Andrew Steinborn
ec1fc3944d Make sure this runs on the event loop. 2020-05-25 12:08:24 -04:00
Andrew Steinborn
942e2f2e1a Better generic cleanup. 2020-05-25 11:56:56 -04:00
Andrew Steinborn
74ff56cbc9 Also reset when an exception is thrown. 2020-05-25 11:49:45 -04:00
Andrew Steinborn
64c16e61d2 Reset in-flight connection only if the server disconnects the client. 2020-05-25 11:44:02 -04:00
Andrew Steinborn
b0f1398b45 Further confinement of preconnect checks to event loop. 2020-05-25 10:26:05 -04:00
Andrew Steinborn
fa954ab717 Confine preconnect validation/setup logic to event loop. 2020-05-25 09:38:41 -04:00
Andrew Steinborn
75ddeb062f Confine preconnect validation/setup logic to event loop. 2020-05-25 09:38:22 -04:00
Andrew Steinborn
a98a7dd67e Merge branch 'dev/1.1.0' into decode-multiple 2020-05-24 11:41:17 -04:00
Andrew Steinborn
b3bd773fea Switch out Cloudflare zlib for libdeflate.
libdeflate is significantly faster than vanilla zlib, zlib-ng, and Cloudflare zlib. It is also MIT-licensed (so no licensing concerns). In addition, it simplifies a lot of the native code (something that's been tricky to get right).

While we're at it, I have also taken the time to fine-time compression in Velocity in general. Thanks to this work, native compression only requires one JNI call, an improvement from the more than 2 (sometimes up to 5) that were possible before. This optimization also extends to the existing Java compressors, though they require potentially two JNI calls.
2020-05-24 10:56:26 -04:00
Andrew Steinborn
91e9769c5a Cap /server list to 50 servers.
Any more, and the server list is arguably useless. Thanks to BXBW for finding this particular issue!
2020-05-17 00:24:00 -04:00
Andrew Steinborn
feb7c2f893 Reject invalid tab complete command requests. 2020-05-08 18:22:21 -04:00
Andrew Steinborn
b42045c050 Reject invalid tab complete command requests. 2020-05-08 18:17:02 -04:00
Andrew Steinborn
2418cc271a
Merge pull request #307 from mikroskeem/feature/prevent-proxy-connections
Add prevent-proxy-connections option
2020-05-08 14:57:20 -04:00
Mark Vainomaa
21f03d5d50
Add prevent-proxy-connections option to make sending client IP to Mojang toggleable 2020-05-08 21:16:12 +03:00
Andrew Steinborn
4d62d61485 We're well into 2020, just saying. 2020-05-08 14:04:07 -04:00
Andrew Steinborn
3bc8323ed5 We're well into 2020, just saying. 2020-05-08 14:03:35 -04:00
Andrew Steinborn
42ad7594ae
Merge pull request #300 from Leymooo/command-event
fix command forwarding to server
2020-04-29 15:26:29 -04:00
Leymooo
aa55af8eb7 fix command forwarding 2020-04-29 22:13:16 +03:00
Andrew Steinborn
e759668f53
Merge pull request #299 from Leymooo/command-event
Add event for commands
2020-04-29 12:51:47 -04:00
Andrew Steinborn
37a1a49fda Allow disabling BungeeCord plugin message channel. 2020-04-28 14:10:54 -04:00
Leymooo
26bf94f08f fix typos, update javadocs 2020-04-27 13:09:04 +03:00
Leymooo
c0b8e9d646 add async methods, also add separate methods which will call event and which will not call event 2020-04-27 01:05:57 +03:00
Leymooo
fb64333813 pass eventLoop to thenApplyAsync 2020-04-27 00:11:49 +03:00
Leymooo
1fb382e0f6 fix logic 2020-04-27 00:09:25 +03:00
Leymooo
6555e0e337 Add CommandExecuteEvent 2020-04-27 00:04:12 +03:00
Andrew Steinborn
1441dec367 Implement brigadier:long argument type, fixes #295 2020-04-23 16:21:44 -04:00
Andrew Steinborn
957c0dd307 Implement brigadier:long argument type, fixes #295 2020-04-23 16:21:22 -04:00
Andrew Steinborn
81a0cbe3b9 Fix rare race condition with transitioning
If the player unexpectedly disconnects after ServerConnectEvent is
fired, but before the connection transitions to the new player, Velocity
would throw an exception thinking the connection was not present. This
is the correct behavior, but the behavior is very surprising. Instead we
will double-check to ensure the connection has not been lost before we
continue with transitioning to the new server.
2020-04-22 10:31:05 -04:00
Andrew Steinborn
2b84d35798 Fix bug in ConnectOther message
Credits to @Jay113355 for spotting this
2020-04-21 06:23:04 -04:00
Andrew Steinborn
d0cbcf65e9 Fix some tab-complete regressions 2020-04-19 09:07:17 -04:00
Andrew Steinborn
413578f979 Fix rare race condition with transitioning
If the player unexpectedly disconnects after ServerConnectEvent is
fired, but before the connection transitions to the new player, Velocity
would throw an exception thinking the connection was not present. This
is the correct behavior, but the behavior is very surprising. Instead we
will double-check to ensure the connection has not been lost before we
continue with transitioning to the new server.
2020-04-19 03:39:15 -04:00