From f4dd970f5e9fda5dd5e0294a8a03dd5c6e74aaaa Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Thu, 16 Nov 2023 20:08:17 +0800 Subject: [PATCH] Add core hysteria2 --- v2rayN/v2rayN/Handler/LazyConfig.cs | 13 +++++++++++++ v2rayN/v2rayN/Mode/ECoreType.cs | 1 + 2 files changed, 14 insertions(+) diff --git a/v2rayN/v2rayN/Handler/LazyConfig.cs b/v2rayN/v2rayN/Handler/LazyConfig.cs index a378dc15..3348c2ff 100644 --- a/v2rayN/v2rayN/Handler/LazyConfig.cs +++ b/v2rayN/v2rayN/Handler/LazyConfig.cs @@ -361,6 +361,19 @@ namespace v2rayN.Handler arguments = "run -c config.json", coreUrl = Global.juicityCoreUrl }); + + coreInfos.Add(new CoreInfo + { + coreType = ECoreType.hysteria2, + coreExes = new List { "hysteria-windows-amd64", "hysteria-windows-386", "hysteria" }, + arguments = "", + coreUrl = Global.hysteriaCoreUrl, + coreReleaseApiUrl = Global.hysteriaCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl), + coreDownloadUrl32 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-386.exe", + coreDownloadUrl64 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-amd64.exe", + coreDownloadUrlArm64 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-arm64.exe", + redirectInfo = true, + }); } #endregion Core Type diff --git a/v2rayN/v2rayN/Mode/ECoreType.cs b/v2rayN/v2rayN/Mode/ECoreType.cs index 2f20ed0b..4e161e4a 100644 --- a/v2rayN/v2rayN/Mode/ECoreType.cs +++ b/v2rayN/v2rayN/Mode/ECoreType.cs @@ -13,6 +13,7 @@ tuic = 23, sing_box = 24, juicity = 25, + hysteria2 = 26, v2rayN = 99 } }