mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-10 05:15:35 +08:00
fix(proxy): proxy provider health check not working, closes #282
This commit is contained in:
parent
713ffb090a
commit
db24ad20bb
@ -128,7 +128,7 @@ export const updateProxyProviderAPI = (providerName: string) => {
|
|||||||
return request.put(`providers/proxies/${providerName}`)
|
return request.put(`providers/proxies/${providerName}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const proxyProviderHealthCheck = (providerName: string) => {
|
export const proxyProviderHealthCheckAPI = (providerName: string) => {
|
||||||
const request = useRequest()
|
const request = useRequest()
|
||||||
|
|
||||||
return request.get(`providers/proxies/${providerName}/healthcheck`, {
|
return request.get(`providers/proxies/${providerName}/healthcheck`, {
|
||||||
|
@ -5,6 +5,7 @@ import {
|
|||||||
fetchProxyProvidersAPI,
|
fetchProxyProvidersAPI,
|
||||||
proxyGroupLatencyTestAPI,
|
proxyGroupLatencyTestAPI,
|
||||||
proxyLatencyTestAPI,
|
proxyLatencyTestAPI,
|
||||||
|
proxyProviderHealthCheckAPI,
|
||||||
selectProxyInGroupAPI,
|
selectProxyInGroupAPI,
|
||||||
updateProxyProviderAPI,
|
updateProxyProviderAPI,
|
||||||
} from '~/apis'
|
} from '~/apis'
|
||||||
@ -185,7 +186,7 @@ export const useProxies = () => {
|
|||||||
|
|
||||||
const proxyProviderLatencyTest = (providerName: string) =>
|
const proxyProviderLatencyTest = (providerName: string) =>
|
||||||
setProxyProviderLatencyTestingMap(providerName, async () => {
|
setProxyProviderLatencyTestingMap(providerName, async () => {
|
||||||
await proxyProviderLatencyTest(providerName)
|
await proxyProviderHealthCheckAPI(providerName)
|
||||||
await fetchProxies()
|
await fetchProxies()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user