server: add client registry with dashboard support (#5115)
This commit is contained in:
committed by
GitHub
Unverified
parent
bc378bcbec
commit
36718d88e4
@@ -0,0 +1,18 @@
|
||||
import { http } from './http'
|
||||
import type { GetProxyResponse, ProxyStatsInfo, TrafficResponse } from '../types/proxy'
|
||||
|
||||
export const getProxiesByType = (type: string) => {
|
||||
return http.get<GetProxyResponse>(`../api/proxy/${type}`)
|
||||
}
|
||||
|
||||
export const getProxy = (type: string, name: string) => {
|
||||
return http.get<ProxyStatsInfo>(`../api/proxy/${type}/${name}`)
|
||||
}
|
||||
|
||||
export const getProxyTraffic = (name: string) => {
|
||||
return http.get<TrafficResponse>(`../api/traffic/${name}`)
|
||||
}
|
||||
|
||||
export const clearOfflineProxies = () => {
|
||||
return http.delete('../api/proxies?status=offline')
|
||||
}
|
||||
Reference in New Issue
Block a user