try to grab the external IP of localhost from the NAT router
This commit is contained in:
@@ -68,6 +68,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
admin.IsVisible = () => orderManager.LobbyInfo.ClientWithIndex(clientIndex).IsAdmin;
|
||||
latency.GetText = () => "Latency: {0}".F(LobbyUtils.LatencyDescription(orderManager.LobbyInfo.ClientWithIndex(clientIndex).Latency));
|
||||
var ipAddress = orderManager.LobbyInfo.ClientWithIndex(clientIndex).IpAddress;
|
||||
if ((ipAddress == null || ipAddress == "127.0.0.1") && UPnP.NatDevice != null)
|
||||
ipAddress = UPnP.NatDevice.GetExternalIP().ToString();
|
||||
ip.GetText = () => LobbyUtils.DescriptiveIpAddress(ipAddress);
|
||||
location.GetText = () => LobbyUtils.LookupCountry(ipAddress);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user