Windows 0.3.4 connection resilience and fixed-grid source delta; no private history or other platform changes
This commit is contained in:
@@ -4,7 +4,7 @@ namespace UCVL.VPNPlus;
|
||||
// A delayed probe must not undo a user's disconnect or judge a different core.
|
||||
internal sealed class ConnectionHealthPolicy
|
||||
{
|
||||
internal enum Decision { Ignore, Keep, Repair, Switch }
|
||||
internal enum Decision { Ignore, Keep, Repair, Degraded, Switch }
|
||||
internal long Revision { get; private set; }
|
||||
internal int Failures { get; private set; }
|
||||
internal bool HasBeenHealthy { get; private set; }
|
||||
@@ -18,7 +18,8 @@ internal sealed class ConnectionHealthPolicy
|
||||
internal void ResetFailures() => Failures = 0;
|
||||
internal bool IsDue(long now, bool running) => !running || now >= _nextProbe;
|
||||
internal Decision Observe(long revision, int? testedCore, int? currentCore,
|
||||
bool wanted, bool busy, bool transitioning, bool exiting, bool healthy, long now, bool proxyHealthy = false)
|
||||
bool wanted, bool busy, bool transitioning, bool exiting, bool healthy, long now, bool proxyHealthy = false,
|
||||
bool activeTailnet = false, bool businessUnavailable = false)
|
||||
{
|
||||
if (revision != Revision || testedCore != currentCore || !wanted || busy || transitioning || exiting)
|
||||
return Decision.Ignore;
|
||||
@@ -26,6 +27,12 @@ internal sealed class ConnectionHealthPolicy
|
||||
HasBeenHealthy = true; Failures = 0; _nextProbe = now + 20_000;
|
||||
return Decision.Keep;
|
||||
}
|
||||
if (currentCore is not null && (businessUnavailable && proxyHealthy || activeTailnet && !proxyHealthy)) {
|
||||
// Third-party HTTP diagnostics cannot identify an active Tailnet
|
||||
// transport failure. The bounded periodic ICMP policy owns fallback.
|
||||
Failures = 0; _nextProbe = now + 20_000;
|
||||
return Decision.Degraded;
|
||||
}
|
||||
if (proxyHealthy && currentCore is not null) {
|
||||
// Do not punish/restart a working node for a local smart-rule fault.
|
||||
// The UI must show degraded routing, not declare the business path healthy.
|
||||
|
||||
Reference in New Issue
Block a user