diff --git a/v2rayN/v2rayN/App.xaml.cs b/v2rayN/v2rayN/App.xaml.cs
index c4e40094371..b61aad77154 100644
--- a/v2rayN/v2rayN/App.xaml.cs
+++ b/v2rayN/v2rayN/App.xaml.cs
@@ -27,7 +27,7 @@ public App()
///
protected override void OnStartup(StartupEventArgs e)
{
- var exePathKey = Utile.GetMD5(Utile.GetExePath());
+ var exePathKey = Utils.GetMD5(Utils.GetExePath());
var rebootas = (e.Args ?? new string[] { }).Any(t => t == Global.RebootAs);
ProgramStarted = new EventWaitHandle(false, EventResetMode.AutoReset, exePathKey, out bool bCreatedNew);
@@ -41,7 +41,7 @@ protected override void OnStartup(StartupEventArgs e)
Logging.Setup();
Init();
Logging.LoggingEnabled(_config.guiItem.enableLog);
- Logging.SaveLog($"v2rayN start up | {Utile.GetVersion()} | {Utile.GetExePath()}");
+ Logging.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}");
Logging.ClearLogs();
Thread.CurrentThread.CurrentUICulture = new(_config.uiItem.currentLanguage);
diff --git a/v2rayN/v2rayN/Common/DownloaderHelper.cs b/v2rayN/v2rayN/Common/DownloaderHelper.cs
index 9f4fe963864..ddfe3811606 100644
--- a/v2rayN/v2rayN/Common/DownloaderHelper.cs
+++ b/v2rayN/v2rayN/Common/DownloaderHelper.cs
@@ -11,7 +11,7 @@ internal class DownloaderHelper
public async Task DownloadStringAsync(IWebProxy? webProxy, string url, string? userAgent, int timeout)
{
- if (Utile.IsNullOrEmpty(url))
+ if (Utils.IsNullOrEmpty(url))
{
return null;
}
@@ -19,9 +19,9 @@ internal class DownloaderHelper
Uri uri = new(url);
//Authorization Header
var headers = new WebHeaderCollection();
- if (!Utile.IsNullOrEmpty(uri.UserInfo))
+ if (!Utils.IsNullOrEmpty(uri.UserInfo))
{
- headers.Add(HttpRequestHeader.Authorization, "Basic " + Utile.Base64Encode(uri.UserInfo));
+ headers.Add(HttpRequestHeader.Authorization, "Basic " + Utils.Base64Encode(uri.UserInfo));
}
var downloadOpt = new DownloadConfiguration()
@@ -57,7 +57,7 @@ internal class DownloaderHelper
public async Task DownloadDataAsync4Speed(IWebProxy webProxy, string url, IProgress progress, int timeout)
{
- if (Utile.IsNullOrEmpty(url))
+ if (Utils.IsNullOrEmpty(url))
{
throw new ArgumentNullException(nameof(url));
}
@@ -120,11 +120,11 @@ public async Task DownloadDataAsync4Speed(IWebProxy webProxy, string url, IProgr
public async Task DownloadFileAsync(IWebProxy? webProxy, string url, string fileName, IProgress progress, int timeout)
{
- if (Utile.IsNullOrEmpty(url))
+ if (Utils.IsNullOrEmpty(url))
{
throw new ArgumentNullException(nameof(url));
}
- if (Utile.IsNullOrEmpty(fileName))
+ if (Utils.IsNullOrEmpty(fileName))
{
throw new ArgumentNullException(nameof(fileName));
}
diff --git a/v2rayN/v2rayN/Common/FileManager.cs b/v2rayN/v2rayN/Common/FileManager.cs
index 6fc6a21cb14..b721f5dbb39 100644
--- a/v2rayN/v2rayN/Common/FileManager.cs
+++ b/v2rayN/v2rayN/Common/FileManager.cs
@@ -67,7 +67,7 @@ public static bool ZipExtractToFile(string fileName, string toPath, string ignor
}
try
{
- if (!Utile.IsNullOrEmpty(ignoredName) && entry.Name.Contains(ignoredName))
+ if (!Utils.IsNullOrEmpty(ignoredName) && entry.Name.Contains(ignoredName))
{
continue;
}
diff --git a/v2rayN/v2rayN/Common/HttpClientHelper.cs b/v2rayN/v2rayN/Common/HttpClientHelper.cs
index 51707be5eae..1c338b61be0 100644
--- a/v2rayN/v2rayN/Common/HttpClientHelper.cs
+++ b/v2rayN/v2rayN/Common/HttpClientHelper.cs
@@ -23,19 +23,19 @@ public class HttpClientHelper
public async Task GetAsync(string url)
{
- if (Utile.IsNullOrEmpty(url)) return null;
+ if (Utils.IsNullOrEmpty(url)) return null;
return await httpClient.GetStringAsync(url);
}
public async Task GetAsync(HttpClient client, string url, CancellationToken token = default)
{
- if (Utile.IsNullOrEmpty(url)) return null;
+ if (Utils.IsNullOrEmpty(url)) return null;
return await client.GetStringAsync(url, token);
}
public async Task PutAsync(string url, Dictionary headers)
{
- var jsonContent = JsonUtile.Serialize(headers);
+ var jsonContent = JsonUtils.Serialize(headers);
var content = new StringContent(jsonContent, Encoding.UTF8, MediaTypeNames.Application.Json);
var result = await httpClient.PutAsync(url, content);
@@ -88,7 +88,7 @@ public static async Task DownloadFileAsync(HttpClient client, string url, string
public async Task DownloadDataAsync4Speed(HttpClient client, string url, IProgress progress, CancellationToken token = default)
{
- if (Utile.IsNullOrEmpty(url))
+ if (Utils.IsNullOrEmpty(url))
{
throw new ArgumentNullException(nameof(url));
}
diff --git a/v2rayN/v2rayN/Common/JsonUtile.cs b/v2rayN/v2rayN/Common/JsonUtils.cs
similarity index 99%
rename from v2rayN/v2rayN/Common/JsonUtile.cs
rename to v2rayN/v2rayN/Common/JsonUtils.cs
index 1c76fc4e25d..2198ba3541c 100644
--- a/v2rayN/v2rayN/Common/JsonUtile.cs
+++ b/v2rayN/v2rayN/Common/JsonUtils.cs
@@ -5,7 +5,7 @@
namespace v2rayN
{
- internal class JsonUtile
+ internal class JsonUtils
{
///
/// DeepCopy
diff --git a/v2rayN/v2rayN/Common/Logging.cs b/v2rayN/v2rayN/Common/Logging.cs
index d989aabf6d5..ba5b97e7e25 100644
--- a/v2rayN/v2rayN/Common/Logging.cs
+++ b/v2rayN/v2rayN/Common/Logging.cs
@@ -13,7 +13,7 @@ public static void Setup()
FileTarget fileTarget = new();
config.AddTarget("file", fileTarget);
fileTarget.Layout = "${longdate}-${level:uppercase=true} ${message}";
- fileTarget.FileName = Utile.GetLogPath("${shortdate}.txt");
+ fileTarget.FileName = Utils.GetLogPath("${shortdate}.txt");
config.LoggingRules.Add(new LoggingRule("*", LogLevel.Debug, fileTarget));
LogManager.Configuration = config;
}
@@ -33,7 +33,7 @@ public static void ClearLogs()
try
{
var now = DateTime.Now.AddMonths(-1);
- var dir = Utile.GetLogPath();
+ var dir = Utils.GetLogPath();
var files = Directory.GetFiles(dir, "*.txt");
foreach (var filePath in files)
{
diff --git a/v2rayN/v2rayN/Common/SqliteHelper.cs b/v2rayN/v2rayN/Common/SqliteHelper.cs
index 68d70feff4b..70beb81074c 100644
--- a/v2rayN/v2rayN/Common/SqliteHelper.cs
+++ b/v2rayN/v2rayN/Common/SqliteHelper.cs
@@ -15,7 +15,7 @@ public sealed class SQLiteHelper
public SQLiteHelper()
{
- _connstr = Utile.GetConfigPath(_configDB);
+ _connstr = Utils.GetConfigPath(_configDB);
_db = new SQLiteConnection(_connstr, false);
_dbAsync = new SQLiteAsyncConnection(_connstr, false);
}
diff --git a/v2rayN/v2rayN/Common/Utile.cs b/v2rayN/v2rayN/Common/Utils.cs
similarity index 98%
rename from v2rayN/v2rayN/Common/Utile.cs
rename to v2rayN/v2rayN/Common/Utils.cs
index 672b576333c..d98d9a7afd3 100644
--- a/v2rayN/v2rayN/Common/Utile.cs
+++ b/v2rayN/v2rayN/Common/Utils.cs
@@ -25,7 +25,7 @@
namespace v2rayN
{
- internal class Utile
+ internal class Utils
{
#region 资源Json操作
@@ -361,7 +361,7 @@ public static ImageSource IconToImageSource(Icon icon)
///
public static string GetPunycode(string url)
{
- if (Utile.IsNullOrEmpty(url))
+ if (Utils.IsNullOrEmpty(url))
{
return url;
}
@@ -391,7 +391,7 @@ public static bool IsBase64String(string plainText)
public static string Convert2Comma(string text)
{
- if (Utile.IsNullOrEmpty(text))
+ if (Utils.IsNullOrEmpty(text))
{
return text;
}
@@ -583,7 +583,7 @@ public static int GetFreePort(int defaultPort = 9090)
{
try
{
- if (!Utile.PortInUse(defaultPort))
+ if (!Utils.PortInUse(defaultPort))
{
return defaultPort;
}
@@ -840,7 +840,7 @@ public static string GetTempPath(string filename = "")
{
Directory.CreateDirectory(_tempPath);
}
- if (Utile.IsNullOrEmpty(filename))
+ if (Utils.IsNullOrEmpty(filename))
{
return _tempPath;
}
@@ -876,7 +876,7 @@ public static string GetConfigPath(string filename = "")
{
Directory.CreateDirectory(_tempPath);
}
- if (Utile.IsNullOrEmpty(filename))
+ if (Utils.IsNullOrEmpty(filename))
{
return _tempPath;
}
@@ -901,7 +901,7 @@ public static string GetBinPath(string filename, string? coreType = null)
Directory.CreateDirectory(_tempPath);
}
}
- if (Utile.IsNullOrEmpty(filename))
+ if (Utils.IsNullOrEmpty(filename))
{
return _tempPath;
}
@@ -918,7 +918,7 @@ public static string GetLogPath(string filename = "")
{
Directory.CreateDirectory(_tempPath);
}
- if (Utile.IsNullOrEmpty(filename))
+ if (Utils.IsNullOrEmpty(filename))
{
return _tempPath;
}
@@ -935,7 +935,7 @@ public static string GetFontsPath(string filename = "")
{
Directory.CreateDirectory(_tempPath);
}
- if (Utile.IsNullOrEmpty(filename))
+ if (Utils.IsNullOrEmpty(filename))
{
return _tempPath;
}
@@ -1107,7 +1107,7 @@ public static void RegWriteValue(string path, string name, object value)
///
public static void AutoStart(string taskName, string fileName, string description)
{
- if (Utile.IsNullOrEmpty(taskName))
+ if (Utils.IsNullOrEmpty(taskName))
{
return;
}
@@ -1122,7 +1122,7 @@ public static void AutoStart(string taskName, string fileName, string descriptio
{
taskService.RootFolder.DeleteTask(t.Name);
}
- if (Utile.IsNullOrEmpty(fileName))
+ if (Utils.IsNullOrEmpty(fileName))
{
return;
}
diff --git a/v2rayN/v2rayN/Converters/MaterialDesignFonts.cs b/v2rayN/v2rayN/Converters/MaterialDesignFonts.cs
index 938db7cc85d..5ce03286685 100644
--- a/v2rayN/v2rayN/Converters/MaterialDesignFonts.cs
+++ b/v2rayN/v2rayN/Converters/MaterialDesignFonts.cs
@@ -12,9 +12,9 @@ static MaterialDesignFonts()
try
{
var fontFamily = LazyConfig.Instance.GetConfig().uiItem.currentFontFamily;
- if (!Utile.IsNullOrEmpty(fontFamily))
+ if (!Utils.IsNullOrEmpty(fontFamily))
{
- var fontPath = Utile.GetFontsPath();
+ var fontPath = Utils.GetFontsPath();
MyFont = new FontFamily(new Uri(@$"file:///{fontPath}\"), $"./#{fontFamily}");
}
}
diff --git a/v2rayN/v2rayN/Handler/ConfigHandler.cs b/v2rayN/v2rayN/Handler/ConfigHandler.cs
index 4b430705e81..fa2377c6fc8 100644
--- a/v2rayN/v2rayN/Handler/ConfigHandler.cs
+++ b/v2rayN/v2rayN/Handler/ConfigHandler.cs
@@ -23,15 +23,15 @@ internal class ConfigHandler
public static int LoadConfig(ref Config? config)
{
//载入配置文件
- var result = Utile.LoadResource(Utile.GetConfigPath(configRes));
- if (!Utile.IsNullOrEmpty(result))
+ var result = Utils.LoadResource(Utils.GetConfigPath(configRes));
+ if (!Utils.IsNullOrEmpty(result))
{
//转成Json
- config = JsonUtile.Deserialize(result);
+ config = JsonUtils.Deserialize(result);
}
else
{
- if (File.Exists(Utile.GetConfigPath(configRes)))
+ if (File.Exists(Utils.GetConfigPath(configRes)))
{
Logging.SaveLog("LoadConfig Exception");
return -1;
@@ -85,7 +85,7 @@ public static int LoadConfig(ref Config? config)
};
}
//路由规则
- if (Utile.IsNullOrEmpty(config.routingBasicItem.domainStrategy))
+ if (Utils.IsNullOrEmpty(config.routingBasicItem.domainStrategy))
{
config.routingBasicItem.domainStrategy = Global.DomainStrategies[0];//"IPIfNonMatch";
}
@@ -144,7 +144,7 @@ public static int LoadConfig(ref Config? config)
{
config.uiItem.mainColumnItem = new();
}
- if (Utile.IsNullOrEmpty(config.uiItem.currentLanguage))
+ if (Utils.IsNullOrEmpty(config.uiItem.currentLanguage))
{
config.uiItem.currentLanguage = Global.Languages[0];
}
@@ -153,7 +153,7 @@ public static int LoadConfig(ref Config? config)
{
config.constItem = new ConstItem();
}
- if (Utile.IsNullOrEmpty(config.constItem.defIEProxyExceptions))
+ if (Utils.IsNullOrEmpty(config.constItem.defIEProxyExceptions))
{
config.constItem.defIEProxyExceptions = Global.IEProxyExceptions;
}
@@ -166,11 +166,11 @@ public static int LoadConfig(ref Config? config)
{
config.speedTestItem.speedTestTimeout = 10;
}
- if (Utile.IsNullOrEmpty(config.speedTestItem.speedTestUrl))
+ if (Utils.IsNullOrEmpty(config.speedTestItem.speedTestUrl))
{
config.speedTestItem.speedTestUrl = Global.SpeedTestUrls[0];
}
- if (Utile.IsNullOrEmpty(config.speedTestItem.speedPingTestUrl))
+ if (Utils.IsNullOrEmpty(config.speedTestItem.speedPingTestUrl))
{
config.speedTestItem.speedPingTestUrl = Global.SpeedPingTestUrl;
}
@@ -220,9 +220,9 @@ private static void ToJsonFile(Config config)
try
{
//save temp file
- var resPath = Utile.GetConfigPath(configRes);
+ var resPath = Utils.GetConfigPath(configRes);
var tempPath = $"{resPath}_temp";
- if (JsonUtile.ToFile(config, tempPath) != 0)
+ if (JsonUtils.ToFile(config, tempPath) != 0)
{
return;
}
@@ -243,34 +243,34 @@ private static void ToJsonFile(Config config)
public static int ImportOldGuiConfig(Config config, string fileName)
{
- var result = Utile.LoadResource(fileName);
- if (Utile.IsNullOrEmpty(result))
+ var result = Utils.LoadResource(fileName);
+ if (Utils.IsNullOrEmpty(result))
{
return -1;
}
- var configOld = JsonUtile.Deserialize(result);
+ var configOld = JsonUtils.Deserialize(result);
if (configOld == null)
{
return -1;
}
- var subItem = JsonUtile.Deserialize>(JsonUtile.Serialize(configOld.subItem));
+ var subItem = JsonUtils.Deserialize>(JsonUtils.Serialize(configOld.subItem));
foreach (var it in subItem)
{
- if (Utile.IsNullOrEmpty(it.id))
+ if (Utils.IsNullOrEmpty(it.id))
{
- it.id = Utile.GetGUID(false);
+ it.id = Utils.GetGUID(false);
}
SQLiteHelper.Instance.Replace(it);
}
- var profileItems = JsonUtile.Deserialize>(JsonUtile.Serialize(configOld.vmess));
+ var profileItems = JsonUtils.Deserialize>(JsonUtils.Serialize(configOld.vmess));
foreach (var it in profileItems)
{
- if (Utile.IsNullOrEmpty(it.indexId))
+ if (Utils.IsNullOrEmpty(it.indexId))
{
- it.indexId = Utile.GetGUID(false);
+ it.indexId = Utils.GetGUID(false);
}
SQLiteHelper.Instance.Replace(it);
}
@@ -281,22 +281,22 @@ public static int ImportOldGuiConfig(Config config, string fileName)
{
continue;
}
- var routing = JsonUtile.Deserialize(JsonUtile.Serialize(it));
+ var routing = JsonUtils.Deserialize(JsonUtils.Serialize(it));
foreach (var it2 in it.rules)
{
- it2.id = Utile.GetGUID(false);
+ it2.id = Utils.GetGUID(false);
}
routing.ruleNum = it.rules.Count;
- routing.ruleSet = JsonUtile.Serialize(it.rules, false);
+ routing.ruleSet = JsonUtils.Serialize(it.rules, false);
- if (Utile.IsNullOrEmpty(routing.id))
+ if (Utils.IsNullOrEmpty(routing.id))
{
- routing.id = Utile.GetGUID(false);
+ routing.id = Utils.GetGUID(false);
}
SQLiteHelper.Instance.Replace(routing);
}
- config = JsonUtile.Deserialize(JsonUtile.Serialize(configOld));
+ config = JsonUtils.Deserialize(JsonUtils.Serialize(configOld));
if (config.coreBasicItem == null)
{
@@ -412,13 +412,13 @@ public static int CopyServer(Config config, List indexes)
continue;
}
- ProfileItem profileItem = JsonUtile.DeepCopy(item);
+ ProfileItem profileItem = JsonUtils.DeepCopy(item);
profileItem.indexId = string.Empty;
profileItem.remarks = $"{item.remarks}-clone";
if (profileItem.configType == EConfigType.Custom)
{
- profileItem.address = Utile.GetConfigPath(profileItem.address);
+ profileItem.address = Utils.GetConfigPath(profileItem.address);
if (AddCustomServer(config, profileItem, false) == 0)
{
}
@@ -440,7 +440,7 @@ public static int CopyServer(Config config, List indexes)
///
public static int SetDefaultServerIndex(Config config, string? indexId)
{
- if (Utile.IsNullOrEmpty(indexId))
+ if (Utils.IsNullOrEmpty(indexId))
{
return -1;
}
@@ -570,12 +570,12 @@ public static int AddCustomServer(Config config, ProfileItem profileItem, bool b
return -1;
}
var ext = Path.GetExtension(fileName);
- string newFileName = $"{Utile.GetGUID()}{ext}";
+ string newFileName = $"{Utils.GetGUID()}{ext}";
//newFileName = Path.Combine(Utile.GetTempPath(), newFileName);
try
{
- File.Copy(fileName, Utile.GetConfigPath(newFileName));
+ File.Copy(fileName, Utils.GetConfigPath(newFileName));
if (blDelete)
{
File.Delete(fileName);
@@ -589,7 +589,7 @@ public static int AddCustomServer(Config config, ProfileItem profileItem, bool b
profileItem.address = newFileName;
profileItem.configType = EConfigType.Custom;
- if (Utile.IsNullOrEmpty(profileItem.remarks))
+ if (Utils.IsNullOrEmpty(profileItem.remarks))
{
profileItem.remarks = $"import custom@{DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")}";
}
@@ -676,7 +676,7 @@ public static int AddTrojanServer(Config config, ProfileItem profileItem, bool t
profileItem.address = profileItem.address.TrimEx();
profileItem.id = profileItem.id.TrimEx();
- if (Utile.IsNullOrEmpty(profileItem.streamSecurity))
+ if (Utils.IsNullOrEmpty(profileItem.streamSecurity))
{
profileItem.streamSecurity = Global.StreamSecurity;
}
@@ -706,7 +706,7 @@ public static int AddHysteria2Server(Config config, ProfileItem profileItem, boo
profileItem.path = profileItem.path.TrimEx();
profileItem.network = string.Empty;
- if (Utile.IsNullOrEmpty(profileItem.streamSecurity))
+ if (Utils.IsNullOrEmpty(profileItem.streamSecurity))
{
profileItem.streamSecurity = Global.StreamSecurity;
}
@@ -741,11 +741,11 @@ public static int AddTuicServer(Config config, ProfileItem profileItem, bool toF
profileItem.headerType = Global.TuicCongestionControls.FirstOrDefault()!;
}
- if (Utile.IsNullOrEmpty(profileItem.streamSecurity))
+ if (Utils.IsNullOrEmpty(profileItem.streamSecurity))
{
profileItem.streamSecurity = Global.StreamSecurity;
}
- if (Utile.IsNullOrEmpty(profileItem.alpn))
+ if (Utils.IsNullOrEmpty(profileItem.alpn))
{
profileItem.alpn = "h3";
}
@@ -913,7 +913,7 @@ public static int AddVlessServer(Config config, ProfileItem profileItem, bool to
{
return -1;
}
- if (!Utile.IsNullOrEmpty(profileItem.security) && profileItem.security != Global.None)
+ if (!Utils.IsNullOrEmpty(profileItem.security) && profileItem.security != Global.None)
{
profileItem.security = Global.None;
}
@@ -951,7 +951,7 @@ public static int AddServerCommon(Config config, ProfileItem profileItem, bool t
{
profileItem.configVersion = 2;
- if (!Utile.IsNullOrEmpty(profileItem.streamSecurity))
+ if (!Utils.IsNullOrEmpty(profileItem.streamSecurity))
{
if (profileItem.streamSecurity != Global.StreamSecurity
&& profileItem.streamSecurity != Global.StreamSecurityReality)
@@ -960,26 +960,26 @@ public static int AddServerCommon(Config config, ProfileItem profileItem, bool t
}
else
{
- if (Utile.IsNullOrEmpty(profileItem.allowInsecure))
+ if (Utils.IsNullOrEmpty(profileItem.allowInsecure))
{
profileItem.allowInsecure = config.coreBasicItem.defAllowInsecure.ToString().ToLower();
}
- if (Utile.IsNullOrEmpty(profileItem.fingerprint) && profileItem.streamSecurity == Global.StreamSecurityReality)
+ if (Utils.IsNullOrEmpty(profileItem.fingerprint) && profileItem.streamSecurity == Global.StreamSecurityReality)
{
profileItem.fingerprint = config.coreBasicItem.defFingerprint;
}
}
}
- if (!Utile.IsNullOrEmpty(profileItem.network) && !Global.Networks.Contains(profileItem.network))
+ if (!Utils.IsNullOrEmpty(profileItem.network) && !Global.Networks.Contains(profileItem.network))
{
profileItem.network = Global.DefaultNetwork;
}
var maxSort = -1;
- if (Utile.IsNullOrEmpty(profileItem.indexId))
+ if (Utils.IsNullOrEmpty(profileItem.indexId))
{
- profileItem.indexId = Utile.GetGUID(false);
+ profileItem.indexId = Utils.GetGUID(false);
maxSort = ProfileExHandler.Instance.GetMaxSort();
}
if (!toFile && maxSort < 0)
@@ -1032,7 +1032,7 @@ private static int RemoveProfileItem(Config config, string indexId)
}
if (item.configType == EConfigType.Custom)
{
- File.Delete(Utile.GetConfigPath(item.address));
+ File.Delete(Utils.GetConfigPath(item.address));
}
SQLiteHelper.Instance.Delete(item);
@@ -1058,14 +1058,14 @@ private static int RemoveProfileItem(Config config, string indexId)
/// 成功导入的数量
private static int AddBatchServers(Config config, string clipboardData, string subid, bool isSub, List lstOriSub)
{
- if (Utile.IsNullOrEmpty(clipboardData))
+ if (Utils.IsNullOrEmpty(clipboardData))
{
return -1;
}
string subFilter = string.Empty;
//remove sub items
- if (isSub && !Utile.IsNullOrEmpty(subid))
+ if (isSub && !Utils.IsNullOrEmpty(subid))
{
RemoveServerViaSubid(config, subid, isSub);
subFilter = LazyConfig.Instance.GetSubItem(subid)?.filter ?? "";
@@ -1098,7 +1098,7 @@ private static int AddBatchServers(Config config, string clipboardData, string s
}
//exist sub items
- if (isSub && !Utile.IsNullOrEmpty(subid))
+ if (isSub && !Utils.IsNullOrEmpty(subid))
{
var existItem = lstOriSub?.FirstOrDefault(t => t.isSub == isSub
&& config.uiItem.enableUpdateSubOnlyRemarksExist ? t.remarks == profileItem.remarks : CompareProfileItem(t, profileItem, true));
@@ -1120,7 +1120,7 @@ private static int AddBatchServers(Config config, string clipboardData, string s
}
}
//filter
- if (!Utile.IsNullOrEmpty(subFilter))
+ if (!Utils.IsNullOrEmpty(subFilter))
{
if (!Regex.IsMatch(profileItem.remarks, subFilter))
{
@@ -1162,7 +1162,7 @@ private static int AddBatchServers(Config config, string clipboardData, string s
private static int AddBatchServers4Custom(Config config, string clipboardData, string subid, bool isSub, List lstOriSub)
{
- if (Utile.IsNullOrEmpty(clipboardData))
+ if (Utils.IsNullOrEmpty(clipboardData))
{
return -1;
}
@@ -1178,10 +1178,10 @@ static bool Contains(string str, params string[] s)
}
//Is v2ray array configuration
- var configObjects = JsonUtile.Deserialize