mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-15 07:12:09 +08:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user