13
0
geforkt von Mirrors/Velocity
Commit graph

985 Commits

Autor SHA1 Nachricht Datum
Andrew Steinborn
8352f7fa70 Add disconnect API call 2018-08-22 00:47:29 -04:00
Andrew Steinborn
55041aa1b1 Add basic implementation. 2018-08-21 23:03:09 -04:00
Andrew Steinborn
7b84da2fa7 Cleaning up some stuff in the proxy implementation. 2018-08-21 22:29:01 -04:00
Andrew Steinborn
2d0c826ec9 Introduce ServerConnection interface
This will become very useful for plugin messaging support.
2018-08-21 21:51:31 -04:00
Andrew Steinborn
9c4e43e1b0
Merge pull request #44 from Minecrell/meta-cleanup
Various improvements to plugin metadata
2018-08-21 17:34:41 -04:00
Minecrell
c43c6cbea2 Add plugin description 2018-08-21 23:13:25 +02:00
Jadon Fowler
65de126934
Fallback to next server on connection error
Closes #11

Co-authored-by: Dylan Keir <jinjaproductionz@gmail.com>
Signed-off-by: Jadon Fowler <jadonflower@gmail.com>
2018-08-21 11:45:07 -07:00
Minecrell
830b1d4798 Various improvements to plugin metadata
- Add plugin (display) name and plugin URL
 - Make everything except plugin ID optional (instead of empty string)
 - Exclude empty properties from generated velocity-plugin.json
 - Make plugin author list immutable
 - Other (minor) cleanup and refactoring
2018-08-21 20:37:10 +02:00
kashike
c4fdac9591 allow more than one author 2018-08-21 09:09:48 -07:00
Andrew Steinborn
a028467e66
Plugin API (#34)
The Velocity API has had a lot of community input (special thanks to @hugmanrique who started the work, @lucko who contributed permissions support, and @Minecrell for providing initial feedback and an initial version of ServerListPlus).

While the API is far from complete, there is enough available for people to start doing useful stuff with Velocity.
2018-08-20 19:30:32 -04:00
Leymooo
381b2033d5 Rename packetDecoding field to onlyEncode 2018-08-17 02:02:22 +03:00
Leymooo
9469065b3c Fix PacketMapping toString/equals/hashCode, do not handle Chat and TabCompleteResponse packets from backend 2018-08-15 20:52:50 +03:00
Andrew Steinborn
718f615d3f Simplify and improve the startup timer. 2018-08-13 07:23:49 -04:00
MatrixTunnel
dbe207d0c2 Add startup time to log messages 2018-08-13 00:44:55 -07:00
Andrew Steinborn
671df77c1f Forward the keep-alive packet directly onto the client.
This improves anti-cheat compatibility.
2018-08-12 08:06:50 -04:00
Andrew Steinborn
5787709ed3
Merge pull request #32 from Leymooo/no-scoreboards
Don't handle scoreboards from backend server
2018-08-12 07:31:11 -04:00
Leymooo
6a2b945ed6 Do not handle scoreboards from backend
Changes in StateRegistry will allow to us skip packets decode which we don't want handle in BackendPlaySessionHandler for a specific versions
Also do not handle respawn packet
2018-08-12 13:35:13 +03:00
kashike
6a3a5a0458 minor shuffle to log messages 2018-08-12 01:36:37 -07:00
Andrew Steinborn
21e72556c9 Correctly handle rapid disconnects. Fixes #31 2018-08-11 06:46:40 -04:00
Andrew Steinborn
8068f72729 Fix up player info forwarding. 2018-08-11 00:22:24 -04:00
Andrew Steinborn
95bd152fee More protocol sanity. 2018-08-10 23:44:52 -04:00
Andrew Steinborn
8bf3b99b10 Make sure the client has time to respond to the player info packet.
Apparently, Minecraft 1.13 can take a little too long to respond to
Velocity's player info forwarding packet. This especially noticeable in
offline mode: by the time the client does respond, Velocity has already
completed the login process and tried connecting to the server (it is
very quick under offline mode).

Noticed by Leymooo.
2018-08-10 23:40:51 -04:00
Andrew Steinborn
7130942032
Merge pull request #28 from MatrixTunnel/feature/ratelime-config
Add login ratelimit configuration
2018-08-10 21:57:58 -04:00
MatrixTunnel
6e4f90dfae Add ratelimit tests 2018-08-10 18:57:10 -07:00
kashike
e9959f81fb use fastutil's Object2IntOpenHashMap 2018-08-10 18:35:54 -07:00
Andrew Steinborn
8998bc7c8f Presize the maps.
TODO: Replace that ugly autoboxed primitive without excessively blowing
up the size of the JAR
2018-08-10 20:56:22 -04:00
MatrixTunnel
479592c009 Fix invalid compression values not stopping proxy 2018-08-10 11:13:53 -07:00
MatrixTunnel
d752edc92d Add login ratelimit configuration 2018-08-10 11:08:55 -07:00
Andrew Steinborn
9af6829688 Fix sending commands to remote server. 2018-08-10 03:05:59 -04:00
Andrew Steinborn
0834bec997 Merge branch 'tab-complete' 2018-08-09 10:15:22 -04:00
Andrew Steinborn
b78ddf7b85 Fix scoreboard teams on Minecraft 1.8. 2018-08-09 10:15:19 -04:00
Andrew Steinborn
2e1de306fb Complete tab-complete support back to Minecraft 1.8. 2018-08-09 10:14:44 -04:00
Andrew Steinborn
9a36bd6cae Merge branch 'master' into tab-complete 2018-08-09 09:47:30 -04:00
Andrew Steinborn
1f0a4a8228 Add support for HMACed player forwarding data.
This provides a small degree of security but also makes Velocity "secure
by default", especially on shared hosts.
2018-08-09 05:24:47 -04:00
Andrew Steinborn
254508a5cf Add connection attempt rate-limiting. 2018-08-09 03:23:27 -04:00
Andrew Steinborn
db8b7c807c Add kqueue transport support 2018-08-08 10:10:11 -04:00
Andrew Steinborn
512b1c2403 Remove erroneously added getter 2018-08-08 09:45:38 -04:00
Andrew Steinborn
a261823302 Add favicon support 2018-08-08 04:44:27 -04:00
Andrew Steinborn
54f9de04dc Add MC tab complete (incomplete, only 1.12.2 works) 2018-08-07 11:53:13 -04:00
Andrew Steinborn
bb601dca4b Add console tab complete, shutdown command, gracefully kick players. 2018-08-07 11:02:35 -04:00
Andrew Steinborn
beb947cc3e
Merge pull request #26 from Minecrell/tca
Add TerminalConsoleAppender for console prompts
2018-08-07 10:38:00 -04:00
Andrew Steinborn
a88d27af76 Ignore repeated shutdown requests. 2018-08-07 10:37:38 -04:00
Minecrell
a044ed72de Add TerminalConsoleAppender for console prompts 2018-08-07 16:32:32 +02:00
Andrew Steinborn
a7a227ed05 Add shutdown flag. 2018-08-07 10:14:34 -04:00
Andrew Steinborn
05693425bf Add a basic command handling framework inspired by Bukkit/BungeeCord.
This doesn't yet support tab complete, that will come later. Additionally,
a /server command (using your configuration) and /velocity (shows basic
copyright information about the proxy) have been added.
2018-08-07 09:34:31 -04:00
Andrew Steinborn
09eff5a2fb GS4 clients generally don't understand MC color codes (or JSON chat). 2018-08-07 07:56:28 -04:00
Andrew Steinborn
b5fcc1b34a Fix GS4 issues. 2018-08-07 07:51:09 -04:00
Andrew Steinborn
3e0df79c98 Fix GS4 "can't bind to null" error. 2018-08-07 07:34:41 -04:00
Mark Vainomaa
fe79c66171 GS4 Query handler (#20) 2018-08-07 07:32:22 -04:00
Andrew Steinborn
b983cdb7b3 Fix some spirous "connection closed" errors. 2018-08-07 07:18:54 -04:00
Andrew Steinborn
a2b4291b36 Use Guava immutable integer arrays. 2018-08-07 07:18:21 -04:00
Andrew Steinborn
abbdf70d5e [Experimental] Remove PacketWrapper objects
In both Velocity and BungeeCord, the most commonly created object is an
object that encapsulates a Minecraft packet and a its associated byte
data.

At first, I considered trying to recycle these objects, but then I
discovered that this object has no reason to exist, and actually somewhat
complicates the implementation. Thus, this commit removes these objects,
making Velocity more more GC-friendly by not allocating frequently-created
objects.

This is still an experimental change, but it's a fairly safe one to make.
2018-08-07 04:28:07 -04:00
Andrew Steinborn
fdf5f27da6 Improve server list ping, especially for legacy MC versions. 2018-08-07 01:02:39 -04:00
MatrixTunnel
ac378a8efa Update version strings + add constant 2018-08-06 16:06:57 -07:00
Andrew Steinborn
6a5c40ecdf
Merge pull request #16 from Desetude/feature/1.8
Add 1.8 support
2018-08-06 18:41:37 -04:00
Mark Vainomaa
9ca1707df3
Fix unregisterConnection using non-lowercase username
Fixes #18
2018-08-06 19:06:25 +03:00
Desetude
b4f1d64cb0 Add 1.8 support 2018-08-06 09:21:01 +01:00
Andrew Steinborn
48822fe55c Better case-insensitivity. 2018-08-05 17:14:39 -04:00
Andrew Steinborn
a778825152 Add server registration API. 2018-08-05 17:10:18 -04:00
Andrew Steinborn
23a6488a39 Add default config again. Closes #12 2018-08-05 16:12:16 -04:00
Andrew Steinborn
4e64b04464 Avoid duplicate logins. 2018-08-05 01:30:40 -04:00
Andrew Steinborn
22d1398f73 Extend the API with a ProxyServer type. 2018-08-05 01:26:07 -04:00
Andrew Steinborn
8aa1fe524e Native cryptography support using mbed TLS 2018-08-04 23:46:41 -04:00
Andrew Steinborn
06a6493605 Cleaned up connection code. 2018-08-04 03:18:57 -04:00
Andrew Steinborn
0ba85fe83f Introduce a fluent connection request API. 2018-08-04 03:13:17 -04:00
Andrew Steinborn
fbdaae5ac7 Actually, this would be a better name... 2018-08-04 01:45:18 -04:00
Andrew Steinborn
9bcdc413d7 ProxiedPlayer interface 2018-08-04 01:40:37 -04:00
Andrew Steinborn
9438d087e2 Refactor cipher logic. 2018-08-04 00:09:25 -04:00
Andrew Steinborn
6f3397f76f Adjustments. 2018-08-03 17:49:35 -04:00
Andrew Steinborn
68ded7ca7f Allow tweaking compression. 2018-08-03 16:56:19 -04:00
Andrew Steinborn
0191b74840 Remove another memory copy with compression.
I considered using composite byte buffers but they would have added GC
overhead and would've been incompatible with any native code we added
unless special care was taken.
2018-08-03 05:21:35 -04:00
Andrew Steinborn
44932cfddb Nuke some debug output. 2018-08-03 02:27:18 -04:00
Andrew Steinborn
7eea1a3ac6 Introduce a connection pool for Mojang's session servers.
This has the potential to cut the time that players spend at the
"logging in..." (or "encrypting..." for 1.13+) screen by a fair
amount (gains of 200+ ms were noted for my own home connection).

While this sounds minor, I really do like to aim for all the details
and this is one of them.
2018-08-03 02:25:57 -04:00
Andrew Steinborn
0c481d828d Remove PluginMessage slicing for now.
This was causing leak issues and needs to be reimplemented. If anyone's
willing to undertake the work, I will gladly accept the PR!
2018-08-03 02:23:58 -04:00
Andrew Steinborn
d38c7467d9 Various Netty changes.
- Potentially fixed a reference count leak with plugin messages.
- Cleaned up plugin message handling.
- Optimized the pipeline for better throughput by eliminating copying
  in the varint encoder and reduced object churn elsewhere.
2018-08-03 00:48:19 -04:00
Andrew Steinborn
68d315d1d3 Improvements for natives. 2018-08-02 23:52:21 -04:00
Andrew Steinborn
12ad629d4d If the channel becomes inactive, the connection's closed, too. 2018-08-02 22:10:55 -04:00
Andrew Steinborn
4bc4a1ec6a Use singular plurals, clean up some stuff. 2018-08-02 14:07:32 -04:00
Andrew Steinborn
2e59138428 Cleaned up native code. 2018-08-02 00:43:38 -04:00
Andrew Steinborn
9815837472 Fix directory structure 2018-08-01 22:27:40 -04:00
Andrew Steinborn
fb4e6fd8f1 JNI native zlib compression 🔥 2018-08-01 22:22:09 -04:00
Andrew Steinborn
22dd4bbb99 Split natives. Add proper disposal for natives. 2018-08-01 00:20:51 -04:00
Andrew Steinborn
284a2a67a2 Remove unused entity remapper. 2018-08-01 00:20:51 -04:00
Andrew Steinborn
8b1e1f20cf A little more documentation. 2018-07-31 16:22:21 -04:00
Andrew Steinborn
bbf861d3bc Convert into a multi-module project.
For now, the API module only contains a few assorted utilities. More
will be added later.
2018-07-31 16:12:41 -04:00