import { http } from './http' import type { GetProxyResponse, ProxyStatsInfo, TrafficResponse } from '../types/proxy' export const getProxiesByType = (type: string) => { return http.get(`../api/proxy/${type}`) } export const getProxy = (type: string, name: string) => { return http.get(`../api/proxy/${type}/${name}`) } export const getProxyTraffic = (name: string) => { return http.get(`../api/traffic/${name}`) } export const clearOfflineProxies = () => { return http.delete('../api/proxies?status=offline') }