mirror of
https://github.com/2dust/v2rayN.git
synced 2026-03-09 18:03:09 +00:00
Compare commits
No commits in common. "5478c901808c685f7e6dee7348b8b77d05b0df62" and "ae7d54c2e59488f24ab1d028a13a7a9255a4ab89" have entirely different histories.
5478c90180
...
ae7d54c2e5
10 changed files with 45 additions and 32 deletions
|
|
@ -193,6 +193,19 @@ public class ActionPrecheckManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ws with tls, tls alpn should contain "http/1.1" in xray core
|
||||||
|
// rfc6455
|
||||||
|
// https://github.com/XTLS/Xray-core/blob/81f8f398c7b2b845853b1e85087c6122acc6db0b/transport/internet/tls/tls.go#L95-L116
|
||||||
|
if (item.Network == nameof(ETransport.ws)
|
||||||
|
&& item.StreamSecurity == Global.StreamSecurity)
|
||||||
|
{
|
||||||
|
var alpnList = Utils.String2List(item.Alpn) ?? [];
|
||||||
|
if (alpnList.Count > 0 && !alpnList.Contains("http/1.1"))
|
||||||
|
{
|
||||||
|
errors.Add(ResUI.AlpnMustContainHttp11ForWsTls);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return errors;
|
return errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ public sealed class CoreInfoManager
|
||||||
new CoreInfo
|
new CoreInfo
|
||||||
{
|
{
|
||||||
CoreType = ECoreType.mihomo,
|
CoreType = ECoreType.mihomo,
|
||||||
CoreExes = GetMihomoCoreExes(),
|
CoreExes = ["mihomo-windows-amd64-v1", "mihomo-windows-amd64-compatible", "mihomo-windows-amd64", "mihomo-linux-amd64", "clash", "mihomo"],
|
||||||
Arguments = "-f {0}" + PortableMode(),
|
Arguments = "-f {0}" + PortableMode(),
|
||||||
Url = GetCoreUrl(ECoreType.mihomo),
|
Url = GetCoreUrl(ECoreType.mihomo),
|
||||||
ReleaseApiUrl = urlMihomo.Replace(Global.GithubUrl, Global.GithubApiUrl),
|
ReleaseApiUrl = urlMihomo.Replace(Global.GithubUrl, Global.GithubApiUrl),
|
||||||
|
|
@ -248,34 +248,4 @@ public sealed class CoreInfoManager
|
||||||
{
|
{
|
||||||
return $"{Global.GithubUrl}/{Global.CoreUrls[eCoreType]}/releases";
|
return $"{Global.GithubUrl}/{Global.CoreUrls[eCoreType]}/releases";
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<string>? GetMihomoCoreExes()
|
|
||||||
{
|
|
||||||
var names = new List<string>();
|
|
||||||
|
|
||||||
if (Utils.IsWindows())
|
|
||||||
{
|
|
||||||
names.Add("mihomo-windows-amd64-v1");
|
|
||||||
names.Add("mihomo-windows-amd64-compatible");
|
|
||||||
names.Add("mihomo-windows-amd64");
|
|
||||||
names.Add("mihomo-windows-arm64");
|
|
||||||
}
|
|
||||||
else if (Utils.IsLinux())
|
|
||||||
{
|
|
||||||
names.Add("mihomo-linux-amd64-v1");
|
|
||||||
names.Add("mihomo-linux-amd64");
|
|
||||||
names.Add("mihomo-linux-arm64");
|
|
||||||
}
|
|
||||||
else if (Utils.IsMacOS())
|
|
||||||
{
|
|
||||||
names.Add("mihomo-darwin-amd64-v1");
|
|
||||||
names.Add("mihomo-darwin-amd64");
|
|
||||||
names.Add("mihomo-darwin-arm64");
|
|
||||||
}
|
|
||||||
|
|
||||||
names.Add("clash");
|
|
||||||
names.Add("mihomo");
|
|
||||||
|
|
||||||
return names;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
11
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
11
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
|
|
@ -19,7 +19,7 @@ namespace ServiceLib.Resx {
|
||||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class ResUI {
|
public class ResUI {
|
||||||
|
|
@ -78,6 +78,15 @@ namespace ServiceLib.Resx {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 ALPN must contain 'http/1.1' when using WebSocket with TLS. 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string AlpnMustContainHttp11ForWsTls {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("AlpnMustContainHttp11ForWsTls", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Export share link to clipboard successfully 的本地化字符串。
|
/// 查找类似 Export share link to clipboard successfully 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1641,4 +1641,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
||||||
<data name="menuServerList2" xml:space="preserve">
|
<data name="menuServerList2" xml:space="preserve">
|
||||||
<value>Configuration Item 2, Select and add from self-built</value>
|
<value>Configuration Item 2, Select and add from self-built</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="AlpnMustContainHttp11ForWsTls" xml:space="preserve">
|
||||||
|
<value>ALPN must contain 'http/1.1' when using WebSocket with TLS.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
@ -1638,4 +1638,7 @@ Si un certificat auto-signé est utilisé ou si le système contient une CA non
|
||||||
<data name="menuServerList2" xml:space="preserve">
|
<data name="menuServerList2" xml:space="preserve">
|
||||||
<value>Élément de config 2 : choisir et ajouter depuis self-hosted</value>
|
<value>Élément de config 2 : choisir et ajouter depuis self-hosted</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="AlpnMustContainHttp11ForWsTls" xml:space="preserve">
|
||||||
|
<value>Avec WebSocket et TLS, l’ALPN doit inclure ‘http/1.1’.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
||||||
|
|
@ -1641,4 +1641,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
||||||
<data name="menuServerList2" xml:space="preserve">
|
<data name="menuServerList2" xml:space="preserve">
|
||||||
<value>Configuration Item 2, Select and add from self-built</value>
|
<value>Configuration Item 2, Select and add from self-built</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="AlpnMustContainHttp11ForWsTls" xml:space="preserve">
|
||||||
|
<value>ALPN must contain 'http/1.1' when using WebSocket with TLS.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
@ -1641,4 +1641,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
||||||
<data name="menuServerList2" xml:space="preserve">
|
<data name="menuServerList2" xml:space="preserve">
|
||||||
<value>Configuration Item 2, Select and add from self-built</value>
|
<value>Configuration Item 2, Select and add from self-built</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="AlpnMustContainHttp11ForWsTls" xml:space="preserve">
|
||||||
|
<value>ALPN must contain 'http/1.1' when using WebSocket with TLS.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
@ -1641,4 +1641,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
||||||
<data name="menuServerList2" xml:space="preserve">
|
<data name="menuServerList2" xml:space="preserve">
|
||||||
<value>Configuration Item 2, Select and add from self-built</value>
|
<value>Configuration Item 2, Select and add from self-built</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="AlpnMustContainHttp11ForWsTls" xml:space="preserve">
|
||||||
|
<value>ALPN must contain 'http/1.1' when using WebSocket with TLS.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
@ -1638,4 +1638,7 @@
|
||||||
<data name="menuServerList2" xml:space="preserve">
|
<data name="menuServerList2" xml:space="preserve">
|
||||||
<value>子配置项二,从自建中选择添加</value>
|
<value>子配置项二,从自建中选择添加</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="AlpnMustContainHttp11ForWsTls" xml:space="preserve">
|
||||||
|
<value>使用 WebSocket+TLS 时,ALPN 必须包含 'http/1.1'。</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
@ -1638,4 +1638,7 @@
|
||||||
<data name="menuServerList2" xml:space="preserve">
|
<data name="menuServerList2" xml:space="preserve">
|
||||||
<value>子配置項二,從自建中選擇新增</value>
|
<value>子配置項二,從自建中選擇新增</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="AlpnMustContainHttp11ForWsTls" xml:space="preserve">
|
||||||
|
<value>ALPN must contain 'http/1.1' when using WebSocket with TLS.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Loading…
Reference in a new issue