diff --git a/Proxd-man/XrayCoreManager.cs b/Proxd-man/XrayCoreManager.cs index a708e61..49b8b15 100644 --- a/Proxd-man/XrayCoreManager.cs +++ b/Proxd-man/XrayCoreManager.cs @@ -260,12 +260,20 @@ public class XrayCoreManager( } else { - var latestXrayCoreVersion = await GetLatestXrayCoreVersion(); - if (currentVersion != latestXrayCoreVersion) + try { - requiredUpdate = true; - logger.LogInformation("发现新版本 Xray-Core (Version: {latestVersion}), 开始下载最新版本...", - latestXrayCoreVersion); + var latestXrayCoreVersion = await GetLatestXrayCoreVersion(); + if (currentVersion != latestXrayCoreVersion) + { + requiredUpdate = true; + logger.LogInformation("发现新版本 Xray-Core (Version: {latestVersion}), 开始下载最新版本...", + latestXrayCoreVersion); + } + } + catch (HttpRequestException e) + { + logger.LogError(e, "检查 Xray-Core 更新时发生错误, 跳过更新."); + return; } }