Idk, dev work goin on

This commit is contained in:
2026-09-09 16:19:45 +03:00 Unverified
parent b0d8bcd742
commit 17a0a9f7a6
318 changed files with 11908 additions and 81 deletions
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Text;
using WinWARP.Core.Helper;
using WinWARP.Core.Models.Entities;
using WinWARP.Core.Services.Interfaces;
namespace WinWARP.Core.Services.Implementations;
public class SubscriptionFetcher : ISubscriptionFetcher
{
public bool IsUrlValid(string subscriptionUrl)
{
Uri? validatedUri;
if (!Uri.TryCreate(subscriptionUrl, UriKind.Absolute, out validatedUri))
{
return false;
}
return validatedUri.Scheme == Uri.UriSchemeHttp ||
validatedUri.Scheme == Uri.UriSchemeHttps;
}
public async Task<Subscription> FetchAsync(string subscriptionUrl)
{
// TODO: Implement the actual fetching logic here, e.g., using HttpClient to get the subscription data from the URL.
await Task.Delay(10); // Simulate an asynchronous operation
return new Subscription
{
DefaultTitle = "Default Subscription",
Link = subscriptionUrl,
Servers = [new() { DefaultTitle = "Default Server", Region = "NO", Title = "Not default title" }]
};
}
}