KaiKikuchi / ServerRedirect

Forge/Fabric mod providing a way for Minecraft servers to transfer players to another server address, without the use of a proxy server.
MIT License
27 stars 9 forks source link

Question: Is IP Forwarding Required? #20

Closed AceSardonyx closed 1 year ago

AceSardonyx commented 1 year ago

If so, what kind? (I am using Velo if that matters) Here are some other various questions I have too if you could answer please :)

  1. What sort of stuff happens if I use this with mohist, sponge, and paper servers.
  2. Does it matter if the server I am doing /redirect from is in offline mode?
  3. Does it matter if this loaded as a plugin or mod? Will they communicate properly?
    
                               For example. What if I wanted to set this up?

Proxy --- Lobby (paper) ----- Other Servers ---------- \ ? (could these connect with redir too? lol) --------------- ModHub (mohist) ------ Pixelmon (spongeforge) | ? - same question as above ^


If there is anything wrong with this configuration, please let me know. ^^

4. And lets just say this is all in 1.16.5 but if you do want to answer, does it matter with versions?
(What about viaversion plugin stuff? If you want to answer because I assume that's a whole different can of worms)
5. I'd like to know alternatives to achieve something similar to having a main lobby to go to all sorts of servers and a modhub lobby that is deticated to modded servers only. (If my configuration cannot work in the way I want it to)
6. Although I did try both, can the redirects work with localhost? Like /redirect @s localhost:25566

I love this plugin a lot due to the fact that it bypasses the post 1.12.2 proxy issue, but I have been trying to use it all day without any response from it. The only response I get from it is when I format the commands wrong.
Help would be much appriciated :)
KaiKikuchi commented 1 year ago

First, I'll answer to your title question. If you are using a proxy like Bungeecord, Velocity, etc, then yes, you need IP forwarding. They might still have to add it for 1.16.5. As far as I know, the issue is in the reset packet (they haven't agreed on a way to do it?), but they should be able to add IP forwarding support anyway... I guess.

I'll try to answer to your other questions:

  1. You can use it just fine. The /redirect command will just send a message to the client that they need to instantly direct connect to another server address. This mod works so it just uses the "Direct Connect" button that you find in your Minecraft client, after clicking "Multiplayer" from the main menu.
  2. No, it does not matter at all
  3. No, it shouldn't matter. I haven't tested having the mod and the plugin at the same time on Mohist though, but I don't think it should be a huge issue. I'd go with the plugin anyway. Your set up should work just fine, but you have to make sure that if you have Pixelmon Reforged 1.16.5, you need those servers to be accessible directly without the proxy.
  4. If you have everything on 1.16.5, I think you cannot use a Proxy + IP forwarding yet (sorry I haven't checked if they have progressed with it! You might be able now so you want to check with them about this!). Instead of using a proxy, you can let players connect to a lobby server directly, and then use Server Redirect to transfer them to the other servers and viceversa.
  5. I think I've just answered to this above
  6. Yes, you can specify any server address. If you do /redirect @s localhost:25566, the target player will try to connect to the server address localhost:25566, like they would have done manually with the "Direct Connect" button.

The clients must have the mod installed for this to work though! Pixelmon Reforged 1.16.5 has this integrated so you don't need it separately. All other clients need the mod in the "mods" folder.

Let me know if you have more questions or if I missed something!

kolderz commented 1 year ago

First, I'll answer to your title question. If you are using a proxy like Bungeecord, Velocity, etc, then yes, you need IP forwarding. They might still have to add it for 1.16.5. As far as I know, the issue is in the reset packet (they haven't agreed on a way to do it?), but they should be able to add IP forwarding support anyway... I guess.

I'll try to answer to your other questions:

  1. You can use it just fine. The /redirect command will just send a message to the client that they need to instantly direct connect to another server address. This mod works so it just uses the "Direct Connect" button that you find in your Minecraft client, after clicking "Multiplayer" from the main menu.
  2. No, it does not matter at all
  3. No, it shouldn't matter. I haven't tested having the mod and the plugin at the same time on Mohist though, but I don't think it should be a huge issue. I'd go with the plugin anyway. Your set up should work just fine, but you have to make sure that if you have Pixelmon Reforged 1.16.5, you need those servers to be accessible directly without the proxy.
  4. If you have everything on 1.16.5, I think you cannot use a Proxy + IP forwarding yet (sorry I haven't checked if they have progressed with it! You might be able now so you want to check with them about this!). Instead of using a proxy, you can let players connect to a lobby server directly, and then use Server Redirect to transfer them to the other servers and viceversa.
  5. I think I've just answered to this above
  6. Yes, you can specify any server address. If you do /redirect @s localhost:25566, the target player will try to connect to the server address localhost:25566, like they would have done manually with the "Direct Connect" button.

The clients must have the mod installed for this to work though! Pixelmon Reforged 1.16.5 has this integrated so you don't need it separately. All other clients need the mod in the "mods" folder.

Let me know if you have more questions or if I missed something!

Proxy + IP forwarding currently not working for me. I have to set bungeecord: false on the modded server in order to use /redirect from the lobby server. Is there any workaround for this?

AceSardonyx commented 1 year ago

Omg, that was great! Thank you so much. I made a little oopsie with forgetting the client-side mod because I thought the pixelmon mod itself had it. Yeah, that pretty much answered it all. Also the 1.16.5 thing is weird because I got a weird packet disconnect error from it. Does it matter what kind of ip forwarding I use?

KaiKikuchi commented 1 year ago

Server Redirect will just work with anything that can be joined with a server address that you can put in the "Direct Connect" button. If you cannot join the server with "Direct Connect", then it won't work with Server Redirect.

What I had in mind with Server Redirect was removing the proxy completely. But if you have IP forwarding set up properly and working, and a way to direct connect to the backend server, then Server Redirect will work just fine.

Unfortunately, I am not up to date with the current IP forwarding situation with proxies and 1.16.5 modded clients, so I am not entirely sure how you can fix your IP forwarding issue. Have you considered removing the proxy and just let your players direct connect to the backend servers?

AceSardonyx commented 1 year ago

I may just do that but with a slight twist because I want the modded servers to be advertizable to my proxy server and attempting their connection does that. The modded servers that would have been backend, I will just make those online. I'll have to experiment but I'm a bit busy. I'll lyk what I come up with because there seems like there could be a lot of combinations for this sorta thing which I kind of like a little. Prone to errors but ya :)

AceSardonyx commented 1 year ago

Essentially, I just want the server to be all in one with only 1 address (probably obvious lol)

kolderz commented 1 year ago

Server Redirect will just work with anything that can be joined with a server address that you can put in the "Direct Connect" button. If you cannot join the server with "Direct Connect", then it won't work with Server Redirect.

What I had in mind with Server Redirect was removing the proxy completely. But if you have IP forwarding set up properly and working, and a way to direct connect to the backend server, then Server Redirect will work just fine.

Unfortunately, I am not up to date with the current IP forwarding situation with proxies and 1.16.5 modded clients, so I am not entirely sure how you can fix your IP forwarding issue. Have you considered removing the proxy and just let your players direct connect to the backend servers?

Is there a way to count players from other servers in the proxy? Since the IP forwarding is turned off. Can I make a plugin for this?

AceSardonyx commented 1 year ago

That is also one of the many reasons I don't want to use this disconnected but a simple workaround is to just use a shared db when storing plugin content. For example, luckperms? I just have it share the same database. And for stuff like coloration for roles, you can specify different servers contexts and stuff. It's super customizable. A lot of plugins provide sql like storage. Now for for stuff such as a friend network or server cross messaging, I would not know how to solve unless they are given their own server to broadcast to everyone. But yeah, it's worth it either way :)

AceSardonyx commented 1 year ago

Oh wait! Venturechat! See! There's a workaround for everything. I love the mod / plugin community sm

KaiKikuchi commented 1 year ago

Essentially, I just want the server to be all in one with only 1 address (probably obvious lol)

The address can be just the lobby/hub address, while all the other addresses are just used for Server Redirect

Is there a way to count players from other servers in the proxy? Since the IP forwarding is turned off. Can I make a plugin for this?

Yes, there is! If you're a coder, or want to hire one, it's not a hard task