mirror of https://github.com/2dust/v2rayN
Adjust cores
parent
655d411afe
commit
86f3ed29f9
|
@ -17,6 +17,7 @@ namespace v2rayN
|
|||
public const string NUrl = @"https://github.com/2dust/v2rayN/releases";
|
||||
public const string ClashCoreUrl = "https://github.com/Dreamacro/clash/releases";
|
||||
public const string ClashMetaCoreUrl = "https://github.com/MetaCubeX/Clash.Meta/releases";
|
||||
public const string MihomoCoreUrl = "https://github.com/MetaCubeX/mihomo/releases";
|
||||
public const string HysteriaCoreUrl = "https://github.com/apernet/hysteria/releases";
|
||||
public const string NaiveproxyCoreUrl = "https://github.com/klzgrad/naiveproxy/releases";
|
||||
public const string TuicCoreUrl = "https://github.com/EAimTY/tuic/releases";
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using v2rayN.Base;
|
||||
using System.Runtime.Intrinsics.X86;
|
||||
using v2rayN.Base;
|
||||
using v2rayN.Mode;
|
||||
|
||||
namespace v2rayN.Handler
|
||||
|
@ -195,13 +196,13 @@ namespace v2rayN.Handler
|
|||
return coreInfos!.FirstOrDefault(t => t.coreType == coreType);
|
||||
}
|
||||
|
||||
public List<CoreInfo>? GetCoreInfos()
|
||||
public List<CoreInfo> GetCoreInfos()
|
||||
{
|
||||
if (coreInfos == null)
|
||||
{
|
||||
InitCoreInfo();
|
||||
}
|
||||
return coreInfos;
|
||||
return coreInfos!;
|
||||
}
|
||||
|
||||
private void InitCoreInfo()
|
||||
|
@ -308,6 +309,18 @@ namespace v2rayN.Handler
|
|||
redirectInfo = true,
|
||||
});
|
||||
|
||||
coreInfos.Add(new CoreInfo
|
||||
{
|
||||
coreType = ECoreType.mihomo,
|
||||
coreExes = new List<string> { $"mihomo-windows-amd64{(Avx2.X64.IsSupported ? "" : "-compatible")}", "mihomo-windows-amd64-compatible", "mihomo-windows-amd64", "mihomo-windows-386", "mihomo", "clash" },
|
||||
arguments = "-f config.yaml",
|
||||
coreUrl = Global.MihomoCoreUrl,
|
||||
coreReleaseApiUrl = Global.MihomoCoreUrl.Replace(Global.GithubUrl, Global.GithubApiUrl),
|
||||
match = "Mihomo",
|
||||
redirectInfo = true,
|
||||
});
|
||||
|
||||
|
||||
coreInfos.Add(new CoreInfo
|
||||
{
|
||||
coreType = ECoreType.hysteria,
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
v2fly_v5 = 4,
|
||||
clash = 11,
|
||||
clash_meta = 12,
|
||||
mihomo = 13,
|
||||
hysteria = 21,
|
||||
naiveproxy = 22,
|
||||
tuic = 23,
|
||||
|
|
|
@ -541,12 +541,12 @@ namespace v2rayN.Views
|
|||
private void AddHelpMenuItem()
|
||||
{
|
||||
var coreInfos = LazyConfig.Instance.GetCoreInfos();
|
||||
foreach (var it in coreInfos)
|
||||
foreach (var it in coreInfos
|
||||
.Where(t => t.coreType != ECoreType.v2fly
|
||||
&& t.coreType != ECoreType.clash
|
||||
&& t.coreType != ECoreType.clash_meta
|
||||
&& t.coreType != ECoreType.hysteria))
|
||||
{
|
||||
if (it.coreType == ECoreType.v2fly)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var item = new MenuItem()
|
||||
{
|
||||
Tag = it.coreUrl.Replace(@"/releases", ""),
|
||||
|
|
Loading…
Reference in New Issue