Adding checks for subscription url

This commit is contained in:
2dust
2024-10-24 17:09:07 +08:00
parent 3fafc6de93
commit 34f5c0f910
11 changed files with 69 additions and 34 deletions
+3 -9
View File
@@ -93,15 +93,9 @@
private static ProfileItem? ResolveSocksNew(string result)
{
Uri parsedUrl;
try
{
parsedUrl = new Uri(result);
}
catch (UriFormatException)
{
return null;
}
var parsedUrl = Utils.TryUri(result);
if (parsedUrl == null) return null;
ProfileItem item = new()
{
Remarks = parsedUrl.GetComponents(UriComponents.Fragment, UriFormat.Unescaped),