DarkMultiPlayer Client

DarkMultiPlayer Client

38.8k Downloads

Server config has no address option

Deadpan110 opened this issue ยท 5 comments

commented

Hosting the server on a machine with more than one network IP address will use all available addresses for the specific port(s) and works as expected.

If you have more than 1 public facing IP address, it is good practice to be able to 'home' the service to listen on a specific address:port - which can then give you the option of hosing more than 1 server - both of which using the same port.
(There are other ways of routing traffic to different instances but are beyond the scope of this feature submission)

eg: On a system with more than 1 IP address:

Address Port
123.45.67.89 6702
89:67:45:123 6702
commented

This makes a lot of sense, but it needs to come with a huge warning in capital letters in the settings file, warning players not to change it.

This setting has caused many false bug reports with KMP.

commented

This is actually a feature, for people who want to host a server over the same port over multiple IP addresses.
lol

commented

Yes I suppose that would cause confusion - I too have dealt with bug reports of people trying to connect to a friends computer using 192.168.1.2 when they are not in the same physical network location (and even someone wondering why everyone has the same IP address as themselves - 127.0.0.1).

Basically I was wanting to setup a free for all sandbox KMP (MCW_VOTE) for development and testing purposes (no mods - well - just Mechjeb to take the hard work out of orbiting and docking) and wanted to keep the default port to avoid confusion.

I will still set one up, but just host our current game on a different port :)

commented

I think you can avoid a lot of confusion if the user/admin looking at the settings file doesn't think they need to fill it out. ie. make it commented out by default. I think this is why people stumble in KMP; They see it as a setting and think they need to change it, when really 99% of people shouldn't ever touch it.

I think this can be completely avoided by:

  1. Including a clear warning
  2. Having the server default to using the ip binding of 127.0.0.1 (or whatever it needs to be internally) when no value is set, allowing it to be commented out.
  3. Use a garbage IP address as example to make it clear that if a user wants to use it, they need to enter the values themselves

So DMPServerSettings.txt should look like this at the beginning:

...
#port - The port that this server instance listens on
port,6702

#publicipbinding - the public-facing IP address that this server instance is bound to
#WARNING: only uncomment if you are hosting a server with multiple outward-facing IP addresses. most servers don't need this setting!
#publicipbinding,123.456.789.010

#warpmode - Specify the warp type
...

If you implement it like this, it should be clear enough that most people won't touch it, unless they know what they are doing.

commented

Implemented via 6cd4c96