ID:2079265
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
In order to determine whether a client's connection is a LAN connection versus an internet connection, we need to know the world's subnet mask.

Currently I'm defaulting to assuming that the final connection is actually from the LAN if the last client address byte differs from from the world's address byte.

Unfortunately, without knowing the client's subnet mask I can't accurately determine whether the connection is from inside of the LAN or outside.

I'll detail the reasons why I'm making this suggestion via PM because some of the information is sensitive.
The issue here is that there are gonna be multiple interfaces with their own subnet mask and clients could come from any.

While this would be nice to genericize, it might just be that this has to be a config parameter in game code.

Edit: if lummox was gonna facilitate this, the best (and most generic) way would be to just have a localconnection flag on the client.

Then byond code can just look at what interface the client came from via whatever api can be used to view a incoming connection's destination ip and look up that in the interface list, then compare with that interface's subnet mask. (the hard part here would be finding the apis for various operating systems)

This could also be handy for world/Topic() for making server management tools or anything else where you might want to give local connections privileged status without limiting yourself to just the local machine (managing server farms by creating a windows management tool add in to control dd instances on vms/server clusters)
way would be to just have a localconnection flag on the client.

You wanna make the feature request? I agree with this. BYOND being targeted toward entry level programmers makes the subnet mask probably a little above the level of the target audience.

Especially for a tool that's supposed to make networked game making easy.