On Tuesday, 4 February 2014 at 13:21:54 UTC, Stanislav Blinov wrote:
Create a connection to another LAN machine with a known address (e.g. gateway or router), then use Socket's localAddress property to get your IP.

Worth noting that this solution is not reliable in general either because your server can possibly have complicated routing configurations that will make, for example, LAN destination packets go via different network interface than WAN destination ones.

It is probably better to tell what high-level problem you are trying to solve to find most useful compromise.

Reply via email to