mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
18 lines
575 B
TypeScript
18 lines
575 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 getProxyTraffic = (name: string) => {
|
|
return http.get<TrafficResponse>(`../api/traffic/${name}`)
|
|
}
|
|
|
|
export const clearOfflineProxies = () => {
|
|
return http.delete('../api/proxies?status=offline')
|
|
}
|