Added the current connection information test url option

https://github.com/2dust/v2rayN/discussions/7268
This commit is contained in:
2dust
2025-05-11 16:59:00 +08:00
parent 8381fefb78
commit a2cfe6fa51
19 changed files with 139 additions and 25 deletions
@@ -243,21 +243,6 @@ public class UpdateService
_updateFunc?.Invoke(true, string.Format(ResUI.MsgDownloadGeoFileSuccessfully, "geo"));
}
public async Task<string> RunAvailabilityCheck()
{
var downloadHandle = new DownloadService();
var time = await downloadHandle.RunAvailabilityCheck(null);
var ip = Global.None;
//if (time > 0)
//{
// var result = await downloadHandle.TryDownloadString(Global.IPAPIUrl, true, Global.IPAPIUrl);
// var ipInfo = JsonUtils.Deserialize<IPAPIInfo>(result);
// ip = $"({ipInfo?.country_code}) {ipInfo?.ip}";
//}
return string.Format(ResUI.TestMeOutput, time, ip);
}
#region CheckUpdate private
private async Task<RetResult> CheckUpdateAsync(DownloadService downloadHandle, ECoreType type, bool preRelease)