DarkMultiPlayer icon indicating copy to clipboard operation
DarkMultiPlayer copied to clipboard

Add setting to disable IPv6 support

Open Rene-Sackers opened this issue 3 years ago • 0 comments

I was trying to run DMP in a Docker container, but it kept throwing System.NotSupportedException: This protocol version is not supported. on TCPServer.Server.DualMode = true;.
If your system does not support IPv6, which my Docker server seems to not, you cannot start the server.

I added a setting to disable IPv6 to circumvent this. The default behavior is the same as before, only a setting was added to disable it.

As commented in the code, I'm not sure why, but if I do

TCPServer.Server.DualMode = Settings.settingsStore.supportIpv6;

even if it was set to false, it would crash. So I had to add an if statement that only set it to true if IPv6 is enabled, and doesn't do anything if it's not.

Rene-Sackers avatar Dec 20 '22 12:12 Rene-Sackers