Allow pre-1.13 connections with modern forwarding#1700
Allow pre-1.13 connections with modern forwarding#1700p0t4t0sandwich wants to merge 4 commits intoPaperMC:dev/3.0.0from
Conversation
|
I mean, this is a weird are as protocol hacks are not something that we support; I'm dubious on the nature of removing a message which makes it fairly trivial to support a somewhat common misconfiguration that people have, protocol hacks don't tend to bump the protocol in a manner that velocity can even see it to attempt using a modern forwarding mechanism. I am loosely open to not getting in the way of such hacks, but, it should be fairly opt in from servers doing stuff rather than removing the forward presentation which makes it clear why the connection can go on |
|
That's quite fair, I was too deep on the topic and didn't think of things from that angle. I could see how removing that check would make things far more confusing to the average user. Not at all married to the name, but would a config flag like this suffice?
Additionally, would it be acceptable to add an opt-in config flag that could change
|
I found this slight redundancy while backporting modern forwarding to Forge 1.7.10-1.12.2, and have verified that Velocity rejects player connections if the backend server has not implemented the necessary player info forwarding flow (as it would with any modern server that doesn't have modern forwarding configured correctly).
The statement in the comment:
No longer seems to be true, considering Velocity's
LoginSessionHandlerwill disconnect the player with the messagevelocity.error.modern-forwarding-failedif the proxy doesn't receive thevelocity:player_infoLoginPluginMessagePacket.The
velocity.error.modern-forwarding-needs-new-clientdisconnect message is also somewhat misleading, as it's on the backend server software to support modern forwarding/have modern forwarding configured correctly.To elaborate: if you're using ViaBackwards on a newer backend server you can connect with an older client and could still technically use modern forwarding without any issues client-side, since the
LoginPluginMessagePacketandLoginPluginResponsePacketpackets are only ever exchanged between Velocity and the backend server.Long story short, this bit of code isn't necessary to enforce the modern forwarding spec.
This also somewhat opens the door to those who want to backport modern forwarding, excluding packet registration. I personally haven't thought of a nice way to handle that yet (since it doesn't abide by the Vanilla MC spec), so for the time being I may just create a proxy plugin that injects into the
StateRegistry.