Skip to content

Add "RegisterIPv6" setting#495

Open
iguanajuice wants to merge 2 commits into
BeamMP:minorfrom
iguanajuice:minor
Open

Add "RegisterIPv6" setting#495
iguanajuice wants to merge 2 commits into
BeamMP:minorfrom
iguanajuice:minor

Conversation

@iguanajuice

Copy link
Copy Markdown

these 2 lines of code are seemingly useless; removing them makes my ipv6 only beammp container work


By creating this pull request, I understand that code that is AI generated or otherwise automatically generated may be rejected without further discussion.
I declare that I fully understand all code I pushed into this PR, and wrote all this code myself and own the rights to this code.

@WiserTixx

WiserTixx commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Those lines are not useless, not everything supports ipv6 (in beammp and for users). Without this line all servers on the server list that support ipv6 will change their listing ip to ipv6. I do not mind this being an option to server operators but I'd prefer it to be toggled via an environment variable. E.g. BEAMMP_HEARTBEAT_IPV6, along with a warning in the console that this might make the server unavailable to some users joining via the public list.

@iguanajuice

Copy link
Copy Markdown
Author

libcurl is smart enough to use both ipv4 and ipv6. i've just now tested beammp server in an ipv4 only container, and it has no problem connecting to the backend with this patch.

so yes, im pretty sure restricting to ipv4 only is useless.

@WiserTixx

Copy link
Copy Markdown
Collaborator

That's not my point. I never said curl was incapable of handling that.
Ipv6 doesn't work for all clients and the backend only lists (and knows) the IP which the server heartbeats from. With this change that would always be ipv6 if available on the host). If a server owners who uses a machine that supports ipv6 were to upgrade to a version with this change it would render their server unusable for most/a large proportion of the player base, without ever changing anything on their side.
I do not want to force server owners to disable ipv6 on their host or spin up an ipv4 only container for every server that works just fine at the moment. Especially considering the fact that a lot of end users simply do not have internet service which supports ipv6.

@iguanajuice

Copy link
Copy Markdown
Author

I'm failing to replicate the scenario you are describing. I created a dual-stack container while also dropping all out-going IPv6 packets (the container/server has an ipv6 address, but one that doesn't work). The server still works.

So unless I'm yet again misinterpreting you, it seems that the server has no problem falling back to ipv4 when ipv6 is assigned but not working.

@WiserTixx

Copy link
Copy Markdown
Collaborator

I'm not talking about the server, it works just fine. When a server registers on the backend with ipv6, and a client without ipv6 support, either because the BeamMP mod/Launcher doesn't support it, or because the user's router/ISP doesn't support it. It will fail, without prior notice. For this to be resolved sizeable changes would need to be made to the backend.
It prevent servers from becoming inaccessible for part of the playerbase this change must be opt-in, and with warning. Just removing that line will make all servers that support ipv6 use it by default for backend requests, thus breaking their public server list entry for some/a lot of players.

@iguanajuice

Copy link
Copy Markdown
Author

I think I understand now.

The best solution would be to attempt to register both address families with the backend, so that a dual-stack server will work with as many users as possible without further configuration.

I would take a crack at this myself, but I don't think the backend is open-source.

@iguanajuice iguanajuice reopened this Jun 19, 2026
@iguanajuice iguanajuice changed the title Allow connecting to backend using IPv6 Add "RegisterIPv6" setting Jun 19, 2026
@iguanajuice

Copy link
Copy Markdown
Author

But for now, I've added a new setting to solve my problem. Default behaviour is identical to pre-patch.

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

Successfully merging this pull request may close these issues.

2 participants