mirror of
https://github.com/fatedier/frp.git
synced 2026-10-07 09:25:55 +08:00
27 lines
695 B
TypeScript
27 lines
695 B
TypeScript
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 getProxyByName = (name: string) => {
|
|
return http.get<ProxyStatsInfo>(`../api/proxies/${name}`)
|
|
}
|
|
|
|
export const getProxyTraffic = (name: string) => {
|
|
return http.get<TrafficResponse>(`../api/traffic/${name}`)
|
|
}
|
|
|
|
export const clearOfflineProxies = () => {
|
|
return http.delete('../api/proxies?status=offline')
|
|
}
|