fix: provider proxy delay check (#7456)

* refactor(proxy): support delay testing for provider-based proxies

* style: remove debug console logs

* docs: update changelog

* feat(services): merge provider nodes into records in calcuProxies

---------

Co-authored-by: Tunglies <tunglies.dev@outlook.com>
This commit is contained in:
oomeow
2026-07-11 05:24:41 +00:00
committed by GitHub
co-authored by Tunglies
parent e8cefa8b07
commit 562828e14d
9 changed files with 73 additions and 87 deletions
+10 -3
View File
@@ -21,7 +21,7 @@ export interface UseProxyDelayState {
delayValue: number
isPreset: boolean
timeout: number
onDelay: () => Promise<void>
onDelay: (providerName?: string) => Promise<void>
}
export function useProxyDelayState(
@@ -72,9 +72,16 @@ export function useProxyDelayState(
updateDelay()
}, [updateDelay])
const onDelay = useLockFn(async () => {
const onDelay = useLockFn(async (providerName?: string) => {
setDelayState({ delay: -2, updatedAt: Date.now() })
setDelayState(await delayManager.checkDelay(proxy.name, groupName, timeout))
setDelayState(
await delayManager.checkDelay(
proxy.name,
groupName,
timeout,
providerName,
),
)
})
return {