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

Protocol Routing #13

Open
MastoryMd5 opened this issue Oct 27, 2022 · 5 comments
Open

Protocol Routing #13

MastoryMd5 opened this issue Oct 27, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@MastoryMd5
Copy link

Hello there, don't know if this is in the scope of the software but would be neat to have the option to route players to different proxy using different protocol versions

@BRA1L0R
Copy link
Owner

BRA1L0R commented Oct 27, 2022

Hi, thank you for the idea: yes it would be in the scope of this project.

How would you represent something like this in config?

@MastoryMd5
Copy link
Author

Probably a good option would be this:

[routing]
default = { ip = "127.0.0.1:12345" } # optional
# default = { ip = ["127.0.0.1:12001", "127.0.0.1:12002"] } # load balanced

# list of servers fronted by hopper
[routing.domain]
# simple reverse proxy
"mc.gaming.tk" = { ip = "docker_hostname:25008" } # hostnames are supported too!

[routing.protocol]
# simple reverse proxy
# for protocol version number check https://wiki.vg/Protocol_version_numbers
"754" = { ip = "docker_hostname:25008" } # 1.16.5 clients will be sent to this proxy!

So in theory if the protocol is the same the client will be connected to the specific proxy instead of the deafault proxy

@BRA1L0R
Copy link
Owner

BRA1L0R commented Oct 27, 2022

Maybe making every domain configurable like you did in [routing.protocol] could be an idea? Letting users specify a range instead of a particular version could also be an idea:

[routing.routes."hostname"]
versions = { "750..=754" = "ip1", "755.." = "ip2" }

@BRA1L0R
Copy link
Owner

BRA1L0R commented Oct 27, 2022

[routing.routes."hostname"]
versions = { "750..=754" = "ip1", "755.." = "ip2" }

Although I fear this syntax might be a bit too complicated

@MastoryMd5
Copy link
Author

It can work since the comments can help guide the person that is going to configure the software

@BRA1L0R BRA1L0R added the enhancement New feature or request label Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants