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

Custom ports #46

Open
Cuteistfox opened this issue Jan 17, 2024 · 12 comments
Open

Custom ports #46

Cuteistfox opened this issue Jan 17, 2024 · 12 comments

Comments

@Cuteistfox
Copy link

I want to be able to use custom port preferably via config files

@ishland
Copy link
Contributor

ishland commented Mar 24, 2024

I don't see the point of changing the port number. What's your use case?

@Cuteistfox
Copy link
Author

having a firewall that doesnt have any ports that support udp and tcp

@ishland
Copy link
Contributor

ishland commented Mar 30, 2024

Don't think such firewall exists. Does the firewall allow adding two rules for udp and tcp on the same port?

@Cuteistfox
Copy link
Author

Don't think such firewall exists. Does the firewall allow adding two rules for udp and tcp on the same port?

no the firewall is managed by my isp to prevent home servers but home servers arent against tos

@TheNukeLore
Copy link

Due to a few limitations I have, I also back this request. It would be useful for choosing custom ports.

@ishland
Copy link
Contributor

ishland commented Aug 29, 2024

This feature is currently behind jvm flags for some platforms: BungeeCord, Fabric

We currently have no plans to expose this as a config file.

@cupang-afk
Copy link

This feature is currently behind jvm flags for some platforms: BungeeCord, Fabric

We currently have no plans to expose this as a config file.

could you add for velocity too ?, i don't really mind if i need to set using jvm flags though

@ishland
Copy link
Contributor

ishland commented Jan 22, 2025

could you add for velocity too ?, i don't really mind if i need to set using jvm flags though

https://modrinth.com/plugin/raknetify/version/DGKCw9tJ

private static final int portOverride = Integer.getInteger("raknetify.velocity.portOverride", -1);

@CherubicBoot
Copy link

CherubicBoot commented Jan 28, 2025

Any update on how to change the port? for my use case, I'm using geysermc and wanted the java and bedrock (udp) port to be the same, therefore changing raknetify port instead of geysermc is the only option for me.

@cupang-afk
Copy link

Any update on how to change the port? for my use case, I'm using geysermc and wanted the java and bedrock (udp) port to be the same, therefore changing raknetify port instead of geysermc is the only option for me.

it possible to change port using java flags as mentioned above

you can have your server port to be the same as geysermc port while raknetify on different port

therefore you need to allow raknetify port though firewall and make your player connect to that port instead of the server port whenever they wanted to connect with raknetify

example

  • server port running on 25565 and geysermc 25565
  • and raknetify port running on 35565

your player need to connect to raknet;example.com:35565 to use raknetify

i've tested this and that is why i requested to enable such option for velocity above

@CherubicBoot
Copy link

Any update on how to change the port? for my use case, I'm using geysermc and wanted the java and bedrock (udp) port to be the same, therefore changing raknetify port instead of geysermc is the only option for me.

it possible to change port using java flags as mentioned above

you can have your server port to be the same as geysermc port while raknetify on different port

therefore you need to allow raknetify port though firewall and make your player connect to that port instead of the server port whenever they wanted to connect with raknetify

example

  • server port running on 25565 and geysermc 25565
  • and raknetify port running on 35565

your player need to connect to raknet;example.com:35565 to use raknetify

i've tested this and that is why i requested to enable such option for velocity above

I'm new to jvm flags that you mentioned, would you mind to help me setting it up? ty!

@cupang-afk
Copy link

I'm new to jvm flags that you mentioned, would you mind to help me setting it up? ty!

put it on before -jar

example velocity

java -Draknetify.velocity.portOverride=35565 -jar server.jar

example bungee

java -Draknetify.bungee.portOverride=35565 -jar server.jar

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

No branches or pull requests

5 participants