initial commit

This commit is contained in:
guiling
2026-05-08 11:59:26 +08:00
commit 2b5e66c1e7
20 changed files with 1604 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
namespace ClashWidget.Models;
public class AppConfig
{
public string ApiHost { get; set; } = "0.0.0.0";
public int ApiPort { get; set; } = 9090;
public string ApiSecret { get; set; } = "123456";
public string TestUrl { get; set; } = "https://www.gstatic.com/generate_204";
public string ApiBaseUrl => $"http://{ApiHost}:{ApiPort}";
}
+33
View File
@@ -0,0 +1,33 @@
using System.Text.Json.Serialization;
namespace ClashWidget.Models;
public class TrafficInfo
{
[JsonPropertyName("upTotal")]
public long UpTotal { get; set; }
[JsonPropertyName("downTotal")]
public long DownTotal { get; set; }
}
public class ProxyEntry
{
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
[JsonPropertyName("type")]
public string Type { get; set; } = string.Empty;
[JsonPropertyName("now")]
public string? Now { get; set; }
[JsonPropertyName("all")]
public List<string>? All { get; set; }
}
public class ProxyGroupResponse
{
[JsonPropertyName("proxies")]
public List<ProxyEntry> Proxies { get; set; } = new();
}