add clash.meta core

pull/2192/head
2dust 2022-04-13 09:21:40 +08:00
parent 688f206555
commit 90289120d3
5 changed files with 13 additions and 0 deletions

View File

@ -20,6 +20,7 @@ namespace v2rayN.Forms
{
cmbCoreType.Items.AddRange(Global.coreTypes.ToArray());
cmbCoreType.Items.Add("clash");
cmbCoreType.Items.Add("clash_meta");
cmbCoreType.Items.Add("hysteria");
cmbCoreType.Items.Add(string.Empty);

View File

@ -15,6 +15,7 @@ namespace v2rayN
public const string xrayCoreUrl = "https://github.com/XTLS/Xray-core/releases";
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 hysteriaCoreUrl = "https://github.com/HyNetwork/hysteria/releases";

View File

@ -92,6 +92,15 @@ namespace v2rayN.Handler
coreUrl = Global.clashCoreUrl
});
coreInfos.Add(new CoreInfo
{
coreType = ECoreType.clash_meta,
coreExes = new List<string> { "Clash.Meta-windows-amd64v1", "Clash.Meta-windows-amd64", "Clash.Meta-windows-386", "Clash.Meta", "clash" },
arguments = "-f config.yaml",
coreUrl = Global.clashMetaCoreUrl,
match = "Clash Meta"
});
coreInfos.Add(new CoreInfo
{
coreType = ECoreType.hysteria,

View File

@ -957,6 +957,7 @@ namespace v2rayN.Handler
case ECoreType.Xray:
break;
case ECoreType.clash:
case ECoreType.clash_meta:
fileContent.Add($"port: {LazyConfig.Instance.GetConfig().GetLocalPort(Global.InboundHttp2)}");
fileContent.Add($"socks-port: {LazyConfig.Instance.GetConfig().GetLocalPort(Global.InboundSocks)}");
break;

View File

@ -6,6 +6,7 @@ namespace v2rayN.Mode
v2fly = 1,
Xray = 2,
clash = 11,
clash_meta = 12,
hysteria = 21,
v2rayN = 99
}