From 4d9890c79724bae5787aa4ddb6d5422a4d39109c Mon Sep 17 00:00:00 2001 From: abc Date: Mon, 28 Feb 2022 10:07:34 +0800 Subject: [PATCH] update v4.1.5 --- ProxySuper.Core/Services/ServiceBase.cs | 4 ++-- ProxySuper.Core/Services/V2rayConfigBuilder.cs | 5 +++-- ProxySuper.Core/Services/XrayConfigBuilder.cs | 5 +++-- ProxySuper.Core/ViewModels/V2rayEditorViewModel.cs | 3 ++- ProxySuper.Core/ViewModels/XrayEditorViewModel.cs | 3 ++- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ProxySuper.Core/Services/ServiceBase.cs b/ProxySuper.Core/Services/ServiceBase.cs index d3dbd80..6e5e836 100644 --- a/ProxySuper.Core/Services/ServiceBase.cs +++ b/ProxySuper.Core/Services/ServiceBase.cs @@ -198,7 +198,7 @@ namespace ProxySuper.Core.Services Progress.Desc = ($"本机IP({IPv6})"); if (IPv6 != domainIP) { - throw new Exception("域名解析地址与服务器IP不匹配!"); + //throw new Exception("域名解析地址与服务器IP不匹配!"); } } else @@ -207,7 +207,7 @@ namespace ProxySuper.Core.Services Progress.Desc = ($"域名IP({domainIP})"); if (IPv4 != domainIP) { - throw new Exception("域名解析地址与服务器IP不匹配!"); + //throw new Exception("域名解析地址与服务器IP不匹配!"); } } } diff --git a/ProxySuper.Core/Services/V2rayConfigBuilder.cs b/ProxySuper.Core/Services/V2rayConfigBuilder.cs index 585ca44..c450b5f 100644 --- a/ProxySuper.Core/Services/V2rayConfigBuilder.cs +++ b/ProxySuper.Core/Services/V2rayConfigBuilder.cs @@ -110,8 +110,9 @@ namespace ProxySuper.Core.Services public static string BuildV2rayConfig(V2raySettings parameters) { - var uuidList = parameters.MulitUUID; - uuidList.Insert(0, parameters.UUID); + var uuidList = new List(); + uuidList.Add(parameters.UUID); + uuidList.AddRange(parameters.MulitUUID); var xrayConfig = LoadV2rayConfig(); diff --git a/ProxySuper.Core/Services/XrayConfigBuilder.cs b/ProxySuper.Core/Services/XrayConfigBuilder.cs index d93a1ba..752fdef 100644 --- a/ProxySuper.Core/Services/XrayConfigBuilder.cs +++ b/ProxySuper.Core/Services/XrayConfigBuilder.cs @@ -113,8 +113,9 @@ namespace ProxySuper.Core.Services public static string BuildXrayConfig(XraySettings parameters) { - var uuidList = parameters.MulitUUID; - uuidList.Insert(0, parameters.UUID); + var uuidList = new List(); + uuidList.Add(parameters.UUID); + uuidList.AddRange(parameters.MulitUUID); var xrayConfig = LoadXrayConfig(); diff --git a/ProxySuper.Core/ViewModels/V2rayEditorViewModel.cs b/ProxySuper.Core/ViewModels/V2rayEditorViewModel.cs index 1460073..dc490d9 100644 --- a/ProxySuper.Core/ViewModels/V2rayEditorViewModel.cs +++ b/ProxySuper.Core/ViewModels/V2rayEditorViewModel.cs @@ -139,7 +139,8 @@ namespace ProxySuper.Core.ViewModels set { var input = value.Replace(',', ','); - var arr = input.Split(',').ToList(); + var arr = input.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); + arr.RemoveAll(x => x == this.UUID); Settings.MulitUUID = arr; RaisePropertyChanged("MultiUUID"); } diff --git a/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs b/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs index db613f7..d9c281d 100644 --- a/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs +++ b/ProxySuper.Core/ViewModels/XrayEditorViewModel.cs @@ -134,7 +134,8 @@ namespace ProxySuper.Core.ViewModels set { var input = value.Replace(',', ','); - var arr = input.Split(',').ToList(); + var arr = input.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); + arr.RemoveAll(x => x == this.UUID); Settings.MulitUUID = arr; RaisePropertyChanged("MultiUUID"); }