Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add extra vHost data in ConnectionHandshakeEvent #1413

Open
wants to merge 1 commit into
base: dev/3.0.0
Choose a base branch
from

Conversation

koneiii
Copy link

@koneiii koneiii commented Aug 26, 2024

I've retrieved a feature from BungeeCord that allows you to retrieve additional data.

Some clients use this method to send data to the server.

Links (French) :
https://gist.github.com/nathan818fr/93516ab7a4968489938c25b097fd1af1
https://github.com/PactifyLauncherExamples/PactifyPlugin/blob/master/bungee/plugin/src/main/java/nz/pactifylauncher/plugin/bungee/HandshakeFix.java

@456dev
Copy link

456dev commented Sep 1, 2024

i would instead suggest a public String getRawVirtualHost() method that returns the string given by clients as-is, rather than only the data following the null byte (seeing as you would need to parse it yourself anyway, and nothing guarantees the format.)

side note, if this if part of the vhost, i would have it as part of the InboundConnection interface, as you may want to access this data after the connection is successful, like the standard vhost

@koneiii
Copy link
Author

koneiii commented Sep 2, 2024

i would instead suggest a public String getRawVirtualHost() method that returns the string given by clients as-is, rather than only the data following the null byte (seeing as you would need to parse it yourself anyway, and nothing guarantees the format.)

side note, if this if part of the vhost, i would have it as part of the InboundConnection interface, as you may want to access this data after the connection is successful, like the standard vhost

I only made it as a bungeecord, I don't plan to modify it currently, I added it for my use :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants