mirror of
https://github.com/2dust/v2rayN.git
synced 2025-11-29 03:02:53 +00:00
Tip
This commit is contained in:
parent
ebb47ee516
commit
c14a0e33b7
9 changed files with 51 additions and 3 deletions
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 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /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.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class ResUI {
|
||||
|
|
@ -2301,6 +2301,15 @@ namespace ServiceLib.Resx {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Please set a valid domain 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ServerNameMustBeValidDomain {
|
||||
get {
|
||||
return ResourceManager.GetString("ServerNameMustBeValidDomain", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 {0} : {1}/s↑ | {2}/s↓ 的本地化字符串。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1615,4 +1615,7 @@ Do not use the "Fetch Certificate" button when "Allow Insecure" is enabled.</val
|
|||
<data name="TbFetchCertChain" xml:space="preserve">
|
||||
<value>Fetch Certificate Chain</value>
|
||||
</data>
|
||||
<data name="ServerNameMustBeValidDomain" xml:space="preserve">
|
||||
<value>Please set a valid domain</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1612,4 +1612,7 @@ Do not use the "Fetch Certificate" button when "Allow Insecure" is enabled.</val
|
|||
<data name="TbFetchCertChain" xml:space="preserve">
|
||||
<value>Fetch Certificate Chain</value>
|
||||
</data>
|
||||
<data name="ServerNameMustBeValidDomain" xml:space="preserve">
|
||||
<value>Please set a valid domain</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1615,4 +1615,7 @@ Do not use the "Fetch Certificate" button when "Allow Insecure" is enabled.</val
|
|||
<data name="TbFetchCertChain" xml:space="preserve">
|
||||
<value>Fetch Certificate Chain</value>
|
||||
</data>
|
||||
<data name="ServerNameMustBeValidDomain" xml:space="preserve">
|
||||
<value>Please set a valid domain</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1615,4 +1615,7 @@ Do not use the "Fetch Certificate" button when "Allow Insecure" is enabled.</val
|
|||
<data name="TbFetchCertChain" xml:space="preserve">
|
||||
<value>Fetch Certificate Chain</value>
|
||||
</data>
|
||||
<data name="ServerNameMustBeValidDomain" xml:space="preserve">
|
||||
<value>Please set a valid domain</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1615,4 +1615,7 @@ Do not use the "Fetch Certificate" button when "Allow Insecure" is enabled.</val
|
|||
<data name="TbFetchCertChain" xml:space="preserve">
|
||||
<value>Fetch Certificate Chain</value>
|
||||
</data>
|
||||
<data name="ServerNameMustBeValidDomain" xml:space="preserve">
|
||||
<value>Please set a valid domain</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1612,4 +1612,7 @@
|
|||
<data name="TbFetchCertChain" xml:space="preserve">
|
||||
<value>获取证书链</value>
|
||||
</data>
|
||||
<data name="ServerNameMustBeValidDomain" xml:space="preserve">
|
||||
<value>请设置有效的域名</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1612,4 +1612,7 @@ Do not use the "Fetch Certificate" button when "Allow Insecure" is enabled.</val
|
|||
<data name="TbFetchCertChain" xml:space="preserve">
|
||||
<value>Fetch Certificate Chain</value>
|
||||
</data>
|
||||
<data name="ServerNameMustBeValidDomain" xml:space="preserve">
|
||||
<value>Please set a valid domain</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -111,9 +111,18 @@ public class AddServerViewModel : MyReactiveObject
|
|||
return;
|
||||
}
|
||||
var domain = SelectedSource.Address;
|
||||
var serverName = SelectedSource.Sni.IsNullOrEmpty() ? SelectedSource.Address : SelectedSource.Sni;
|
||||
var serverName = SelectedSource.Sni;
|
||||
if (serverName.IsNullOrEmpty())
|
||||
{
|
||||
serverName = SelectedSource.RequestHost;
|
||||
}
|
||||
if (serverName.IsNullOrEmpty())
|
||||
{
|
||||
serverName = SelectedSource.Address;
|
||||
}
|
||||
if (!Utils.IsDomain(serverName))
|
||||
{
|
||||
NoticeManager.Instance.Enqueue(ResUI.ServerNameMustBeValidDomain);
|
||||
return;
|
||||
}
|
||||
if (SelectedSource.Port > 0)
|
||||
|
|
@ -130,9 +139,18 @@ public class AddServerViewModel : MyReactiveObject
|
|||
return;
|
||||
}
|
||||
var domain = SelectedSource.Address;
|
||||
var serverName = SelectedSource.Sni.IsNullOrEmpty() ? SelectedSource.Address : SelectedSource.Sni;
|
||||
var serverName = SelectedSource.Sni;
|
||||
if (serverName.IsNullOrEmpty())
|
||||
{
|
||||
serverName = SelectedSource.RequestHost;
|
||||
}
|
||||
if (serverName.IsNullOrEmpty())
|
||||
{
|
||||
serverName = SelectedSource.Address;
|
||||
}
|
||||
if (!Utils.IsDomain(serverName))
|
||||
{
|
||||
NoticeManager.Instance.Enqueue(ResUI.ServerNameMustBeValidDomain);
|
||||
return;
|
||||
}
|
||||
if (SelectedSource.Port > 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue