mirror of
https://github.com/2dust/v2rayN.git
synced 2025-07-01 12:32:10 +00:00
Add hysteria support
This commit is contained in:
parent
ece4572058
commit
70feacd276
5 changed files with 22 additions and 2 deletions
|
@ -19,6 +19,7 @@ namespace v2rayN.Forms
|
|||
{
|
||||
cmbCoreType.Items.AddRange(Global.coreTypes.ToArray());
|
||||
cmbCoreType.Items.Add("clash");
|
||||
cmbCoreType.Items.Add("hysteria");
|
||||
cmbCoreType.Items.Add(string.Empty);
|
||||
|
||||
txtAddress.ReadOnly = true;
|
||||
|
|
|
@ -15,8 +15,9 @@ 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 hysteriaCoreUrl = "https://github.com/HyNetwork/hysteria/releases";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -940,6 +940,15 @@ namespace v2rayN.Handler
|
|||
vmessItem.coreType = ECoreType.clash;
|
||||
vmessItem.address = fileName;
|
||||
vmessItem.remarks = "clash_custom";
|
||||
}
|
||||
//Is Other configuration
|
||||
else
|
||||
{
|
||||
var fileName = Utils.GetTempPath($"{Utils.GetGUID(false)}.txt");
|
||||
File.WriteAllText(fileName, clipboardData);
|
||||
|
||||
vmessItem.address = fileName;
|
||||
vmessItem.remarks = "other_custom";
|
||||
}
|
||||
|
||||
if (!Utils.IsNullOrEmpty(subid))
|
||||
|
|
|
@ -90,6 +90,14 @@ namespace v2rayN.Handler
|
|||
arguments = "-f config.json",
|
||||
coreUrl = Global.clashCoreUrl
|
||||
});
|
||||
|
||||
coreInfos.Add(new CoreInfo
|
||||
{
|
||||
coreType = ECoreType.hysteria,
|
||||
coreExes = new List<string> { "hysteria-tun-windows-6.0-amd64", "hysteria-tun-windows-6.0-386", "hysteria" },
|
||||
arguments = "",
|
||||
coreUrl = Global.hysteriaCoreUrl
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,8 @@ namespace v2rayN.Mode
|
|||
{
|
||||
v2fly = 1,
|
||||
Xray = 2,
|
||||
clash = 3,
|
||||
clash = 11,
|
||||
hysteria = 21,
|
||||
v2rayN = 99
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue