add tuic support

pull/2501/head^2
2dust 2022-07-26 20:02:07 +08:00
parent f09a13259f
commit 87ffad398e
4 changed files with 20 additions and 5 deletions

View File

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
@ -18,11 +19,15 @@ namespace v2rayN.Forms
private void AddServer2Form_Load(object sender, EventArgs e)
{
cmbCoreType.Items.AddRange(Global.coreTypes.ToArray());
cmbCoreType.Items.Add("clash");
cmbCoreType.Items.Add("clash_meta");
cmbCoreType.Items.Add("hysteria");
cmbCoreType.Items.Add("naiveproxy");
List<string> coreTypes = new List<string> ();
foreach (ECoreType it in Enum.GetValues(typeof(ECoreType)))
{
if (it == ECoreType.v2rayN)
continue;
coreTypes.Add(it.ToString());
}
cmbCoreType.Items.AddRange(coreTypes.ToArray());
cmbCoreType.Items.Add(string.Empty);
txtAddress.ReadOnly = true;

View File

@ -18,6 +18,7 @@ namespace v2rayN
public const string clashMetaCoreUrl = "https://github.com/MetaCubeX/Clash.Meta/releases";
public const string hysteriaCoreUrl = "https://github.com/HyNetwork/hysteria/releases";
public const string naiveproxyCoreUrl = "https://github.com/klzgrad/naiveproxy/releases";
public const string tuicCoreUrl = "https://github.com/EAimTY/tuic/releases";
public const string geoUrl = "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/{0}.dat";

View File

@ -138,6 +138,14 @@ namespace v2rayN.Handler
arguments = "config.json",
coreUrl = Global.naiveproxyCoreUrl
});
coreInfos.Add(new CoreInfo
{
coreType = ECoreType.tuic,
coreExes = new List<string> { "tuic-client", "tuic" },
arguments = "-c config.json",
coreUrl = Global.tuicCoreUrl
});
}
}

View File

@ -9,6 +9,7 @@ namespace v2rayN.Mode
clash_meta = 12,
hysteria = 21,
naiveproxy = 22,
tuic = 23,
v2rayN = 99
}
}