diff --git a/v2rayN/v2rayN/Common/QRCodeHelper.cs b/v2rayN/v2rayN/Common/QRCodeHelper.cs
index 9b02a48b..255ab475 100644
--- a/v2rayN/v2rayN/Common/QRCodeHelper.cs
+++ b/v2rayN/v2rayN/Common/QRCodeHelper.cs
@@ -1,13 +1,13 @@
using QRCoder;
using QRCoder.Xaml;
using System.Drawing;
-using System.Windows.Interop;
using System.Windows;
+using System.Windows.Interop;
using System.Windows.Media;
+using ZXing;
using ZXing.Common;
using ZXing.QrCode;
using ZXing.Windows.Compatibility;
-using ZXing;
namespace v2rayN
{
diff --git a/v2rayN/v2rayN/Handler/ConfigHandler.cs b/v2rayN/v2rayN/Handler/ConfigHandler.cs
index b2b11278..a8a248bb 100644
--- a/v2rayN/v2rayN/Handler/ConfigHandler.cs
+++ b/v2rayN/v2rayN/Handler/ConfigHandler.cs
@@ -2,6 +2,7 @@
using System.IO;
using System.Text.RegularExpressions;
using v2rayN.Enums;
+using v2rayN.Handler.Fmt;
using v2rayN.Models;
namespace v2rayN.Handler
@@ -1070,12 +1071,12 @@ namespace v2rayN.Handler
/// 批量添加服务器
///
///
- ///
+ ///
///
/// 成功导入的数量
- private static int AddBatchServers(Config config, string clipboardData, string subid, bool isSub, List lstOriSub)
+ private static int AddBatchServers(Config config, string strData, string subid, bool isSub, List lstOriSub)
{
- if (Utils.IsNullOrEmpty(clipboardData))
+ if (Utils.IsNullOrEmpty(strData))
{
return -1;
}
@@ -1092,7 +1093,7 @@ namespace v2rayN.Handler
//Check for duplicate indexId
List? lstDbIndexId = null;
List lstAdd = new();
- var arrData = clipboardData.Split(Environment.NewLine.ToCharArray()).Where(t => !t.IsNullOrEmpty());
+ var arrData = strData.Split(Environment.NewLine.ToCharArray()).Where(t => !t.IsNullOrEmpty());
if (isSub)
{
arrData = arrData.Distinct();
@@ -1108,7 +1109,7 @@ namespace v2rayN.Handler
}
continue;
}
- var profileItem = ShareHandler.ImportFromClipboardConfig(str, out string msg);
+ var profileItem = FmtHandler.ResolveConfig(str, out string msg);
if (profileItem is null)
{
continue;
@@ -1177,9 +1178,9 @@ namespace v2rayN.Handler
return countServers;
}
- private static int AddBatchServers4Custom(Config config, string clipboardData, string subid, bool isSub, List lstOriSub)
+ private static int AddBatchServers4Custom(Config config, string strData, string subid, bool isSub, List lstOriSub)
{
- if (Utils.IsNullOrEmpty(clipboardData))
+ if (Utils.IsNullOrEmpty(strData))
{
return -1;
}
@@ -1195,7 +1196,7 @@ namespace v2rayN.Handler
}
//Is v2ray array configuration
- var configObjects = JsonUtils.Deserialize