Fourth, you should be able to handle the case at runtime. I would highly recommend vs various builds. For example: try external, if not execute internal.
Some heuristics:
An internal IP address means the network is the same. Thus, you can check it if it is the same, try the internal address of the 1st, otherwise the external one takes precedence. Later, save the mapping of the local IP address to a successfully connected one and view it to change the priority.
The resolution itself can be done by querying the root of the "/" server with a timeout (you can use 2 different threads to transfer the task at the same time, if you so wish).
Moreover, if you have access to a router / firewall, this can be done for external address recognition and proper processing. That way you can end up with an external address that works correctly.
bestsss
source share