pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.28k stars 1.54k forks source link

Supports tcp and udp granularity for server port allocation #4850

Open Fallen-Breath opened 10 months ago

Fallen-Breath commented 10 months ago

Is there an existing feature request for this?

Describe the feature you would like to see.

Here's a usage example for the feature request:

Currently it's not possible to do that, since wings assigns both 25565/tcp and 25565/udp to the Minecraft container. Although Minecraft only uses the tcp port, the udp port is still occupied by the container, and cannot be used by other containers / programs

https://github.com/pterodactyl/wings/blob/438e5fdbe9d78a6fc0e781748cabd183c444a57e/environment/allocations.go#L53-L57

The current workaround is to let the kcptun runs on another port rather than 25565. It's work-able, but it's far less elegant that just reusing the 2565 port number

Describe the solution you'd like.

In the allocation creation page, let the ports input support port format like 25565/tcp, 25565/udp, indicating this allocation will only allocates the port with tcp or udp protocol

image

If the /tcp or /udp suffix does not exist, then allocates both tcp or udp protocol, which is the current behavior

Additional context to this request.

No response

QuintenQVD0 commented 10 months ago

as far as I know this is possible to let service a bind to port 25565 tcp and another service to 25565 udp, but this will be a pain and almost impossible to handle for hosts and on whmcs

Fallen-Breath commented 10 months ago

this is not even possible to let service a bind to port 25565 tcp and another service to 25565 udp

It's possible

image

jlopez994 commented 4 months ago

@Fallen-Breath how did you define the port allocation to split It by protocol?

Fallen-Breath commented 4 months ago

In the allocation creation page, let the ports input support port format like 25565/tcp, 25565/udp, indicating this allocation will only allocates the port with tcp or udp protocol

I have already described the example solution in the "Describe the solution you'd like" section of https://github.com/pterodactyl/panel/issues/4850#issue-1868083602