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.6k stars 1.65k forks source link

Node Allocations and Networking Overhaul #4533

Open matthewpi opened 1 year ago

matthewpi commented 1 year ago

Is there an existing feature request for this?

Describe the feature you would like to see.

The concept of allocations have changed over time. For the most part, they work perfectly fine and are a good solution to assigning ports to servers. However, complexity arrives with different network configurations and different eggs requiring different ports.

Describe the solution you'd like.

An example of this complexity is the concept of dedicated IPs. Currently, the only implementation of dedicated IPs comes when using an external service with the Application API to deploy servers. All the dedicated IP option does is prevent using allocations with the same IP already assigned to a server, regardless if extra ports are available or not. This is not an ideal solution as IPs still need individual ports allocated upfront rather than dynamically creating them. Ideally we would have three types of allocations, IP and Port, individual IPs, and subnets.

IP and Port Allocations would function exactly as they do right now, you create them upfront and assign them to a server. Individual IP Allocations would be very similar to IP and Port Allocations, except there is no longer a port specified on the allocation, but rather the server is able to pick whatever ports it would like. Alongside Individual IP Allocations, I'd like to add new fields to eggs that allow each egg to specify port settings, which would include the number of ports required, an ideal default port (for example Minecraft would specify a requirement for a single-port, preferring 25565 if it is available), and an ideal port-range for automatic allocation. Finally, Subnet Allocations will function identically as Individual IP Allocations except IPs are selected from a subnet. IPs will likely be selected in sequential order for IPv4 subnets and at random for large IPv6 subnets. Subnet Allocations will also go into better supporting IPv6 where containers should not need to be assigned a private IPv6 address and only receive a fully publicly routable IPv6 address.


Further building on the egg port configuration, eggs should be able to remap the container and public ports independently. What I mean by this is the allocation could have port 25566 but whenever a connection comes into IP:25566 it gets mapped into the container as a different port, say 25565 for example. This allows games that don't support configuring what ports they bind to, to still be possible to run in Pterodactyl without requiring dedicated IPs for every server running that egg. I should also add here, that this is not a solution for every game as some of them use things like server lists or hard-code ports in the client where remapping the port will not work.

Additional context to this request.

Everything I have written is a rough concept of a bunch of changes. The plan I've laid out is likely to change. I'm posting this issue as a way to consolidate a bunch of other issues and to group a bunch of small improvements and tweaks into a bigger rework that has many more benefits. If you have any questions or concerns about these proposed changes, feel free to reply to this issue. These changes are about improving UX and solving problems, and that requires users to participate in discussions about making changes that could affect them.

In terms of a release target or timeline for these changes, I don't have any specific details. Likely this will be implemented in the initial release of v2, but it may slip to a later v2.x later depending on the complexity and time requirements.

lauridskern commented 7 months ago

what happend to this? It would be nice if you wouldn't need to create an allocation, look for the right one, add ports to game config and add ports to firewall as well