Merge branch '2dust:master' into master
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -932,7 +932,23 @@ namespace v2rayN.Forms
|
||||
}
|
||||
if (ConfigHandler.SetDefaultServer(ref config, lstVmess[index]) == 0)
|
||||
{
|
||||
RefreshServers();
|
||||
//RefreshServers();
|
||||
for (int k = 0; k < lstVmess.Count; k++)
|
||||
{
|
||||
if (config.IsActiveNode(lstVmess[k]))
|
||||
{
|
||||
lvServers.Items[k].SubItems[0].Text = "√";
|
||||
lvServers.Items[k].ForeColor = Color.DodgerBlue;
|
||||
lvServers.Items[k].Font = new Font(lvServers.Font, FontStyle.Bold);
|
||||
}
|
||||
else
|
||||
{
|
||||
lvServers.Items[k].SubItems[0].Text = "";
|
||||
lvServers.Items[k].ForeColor = lvServers.ForeColor;
|
||||
lvServers.Items[k].Font = new Font(lvServers.Font, FontStyle.Regular);
|
||||
}
|
||||
}
|
||||
RefreshServersMenu();
|
||||
_ = LoadV2ray();
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace v2rayN.Mode
|
||||
clash_meta = 12,
|
||||
hysteria = 21,
|
||||
naiveproxy = 22,
|
||||
tuic = 23,
|
||||
v2rayN = 99
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user