feat(proxy-fitness): egress geo probe + unstable detection + state sweeper
Background probe fetches ipinfo through each pool itself (provider-agnostic transport), fills an egress IP/country cache (TTL 1h, 8-IP history) and flags flapping relays as unstable. Periodic state sweeper (10 min) prunes expired fitness marks, stale geo/ip-history and Freebuff session/cooldown state; schedulers skip non-server runtimes. Unit tests for the geo cache.
This commit is contained in:
@@ -118,6 +118,16 @@ async function runHeavyStartup() {
|
||||
import("@/sse/services/backgroundTokenRefresh.js")
|
||||
.then(({ startBackgroundTokenRefresh }) => startBackgroundTokenRefresh())
|
||||
.catch((e) => console.log("[BackgroundTokenRefresh] scheduler start failed:", e.message));
|
||||
|
||||
// Pool egress geo probe — fills the Proxy Fitness / Proxy Pools egress column.
|
||||
import("@/lib/network/poolEgressProbe.js")
|
||||
.then(({ startPoolEgressProbe }) => startPoolEgressProbe())
|
||||
.catch((e) => console.log("[PoolEgressProbe] scheduler start failed:", e.message));
|
||||
|
||||
// Periodic in-memory state sweeper — prunes expired fitness/geo/session state.
|
||||
import("@/lib/network/stateSweeper.js")
|
||||
.then(({ startStateSweeper }) => startStateSweeper())
|
||||
.catch((e) => console.log("[StateSweeper] scheduler start failed:", e.message));
|
||||
}
|
||||
|
||||
function hasQuotaAutoPingEnabled(settings) {
|
||||
|
||||
Reference in New Issue
Block a user