Windows 0.3.5 traffic trends UI source delta; connection fixes retained; no private history or other platform changes

This commit is contained in:
2026-11-06 10:54:33 +00:00
parent 991b029b37
commit 7f7d4f6d35
19 changed files with 923 additions and 304 deletions
+5 -4
View File
@@ -65,12 +65,13 @@ internal sealed class VpnApiClient : IDisposable
return await GitReleaseUpdater.GetLatestAsync(cancellationToken);
}
internal async Task<NodeTrafficSnapshot> GetNodeTrafficAsync(string token, CancellationToken cancellationToken)
internal async Task<NodeTrafficSnapshot> GetNodeTrafficAsync(string token, CancellationToken cancellationToken,DateTimeOffset? since=null)
{
using var deadline = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
deadline.CancelAfter(TimeSpan.FromSeconds(3));
using var request = AuthorizedRequest(HttpMethod.Get, "api/v1/client/node-traffic/", token);
return await SendAsync<NodeTrafficSnapshot>(request, deadline.Token, maximumBodyBytes: 32 * 1024);
deadline.CancelAfter(TimeSpan.FromSeconds(since.HasValue?3:8));
var path="api/v1/client/node-traffic/"+(since is { } cursor?"?since="+Uri.EscapeDataString(cursor.ToString("O")):"");
using var request = AuthorizedRequest(HttpMethod.Get, path, token);
return await SendAsync<NodeTrafficSnapshot>(request, deadline.Token, maximumBodyBytes: 1024 * 1024);
}
internal async Task<ConfigResponse> GetConfigAsync(string token, string nodeSlug, string routeMode, CancellationToken cancellationToken, IEnumerable<string>? excluded = null)