ViaVersion / VIAaaS

ViaVersion as a Service - standalone ViaVersion proxy
https://viaversion.github.io/VIAaaS
GNU Affero General Public License v3.0
162 stars 12 forks source link

Handshake is not sent in 1.8 #231

Closed adiantek closed 1 year ago

adiantek commented 1 year ago

viaversion dump Output

https://dump.viaversion.com/3bdde4aeeed4dc66c3ef7c5e41e39d6c3eff312e2013a40cf6c9e16d715a283b

Console Error

2023-07-08 06:16:01 [Via-1] [ViaVersion] I Finished mapping loading, shutting down loader executor!
2023-07-08 06:16:40 [epollEventLoopGroup-3-2] [VIAaaS MC] D HS: /172.22.80.1:63054 LOGIN 172.22.88.21 25565 v340
2023-07-08 06:16:40 [DefaultDispatcher-worker-1] [VIAaaS MC] I Login: /172.22.80.1:63054 k0l0r3k99_xyz d5dfe368-ae1c-3980-bb5c-9b6c60eaf3f3
2023-07-08 06:16:40 [DefaultDispatcher-worker-1] [VIAaaS MC] I + L /172.22.80.1:63054 -> localhost/127.0.0.1:25562
2023-07-08 06:16:45 [epollEventLoopGroup-3-2] [VIAaaS MC] I - /172.22.80.1:63054: -
2023-07-08 06:16:45 [epollEventLoopGroup-3-2] [VIAaaS MC] I - localhost/127.0.0.1:25562: -

Bug Description

Handshake packet is not sent and login packet looks invalid:

$ nc -l -p 25562 | hexdump -C
00000000  00 0d 6b 30 6c 30 72 33  6b 39 39 5f 78 79 7a     |..k0l0r3k99_xyz|
0000000f

It doesn't have length prefix.

Steps to Reproduce

  1. Login with 1.12.2 client
  2. Disable require-host-name
  3. Disable block-local-address
  4. Start the server on port 25562 (or even nc -l -p 25562 | hexdump -C)
  5. Connect to VIAaaS using 172.22.88.21._p25562._v1_8._of.via.localhost

Expected Behavior

Handshake should be sent to backend server like in 1.9+:

$ nc -l -p 25562 | hexdump -C
00000000  12 00 6b 0c 31 37 32 2e  32 32 2e 38 38 2e 32 31  |..k.172.22.88.21|
00000010  63 da 02 0f 00 0d 6b 30  6c 30 72 33 6b 39 39 5f  |c.....k0l0r3k99_|

Additional Server Info

I tried v1_8 or 1.8.x from webpanel or _v1_8_x

Checklist

adiantek commented 1 year ago

I tested ViaProxy and it works fine, so it's problem with VIAaaS