Add proxy install session client API

This commit is contained in:
RWDai
2026-05-14 19:34:56 +08:00
parent 2db85b1c53
commit 98a54b4633
2 changed files with 31 additions and 0 deletions

View File

@@ -164,6 +164,20 @@ export interface ManualProxyNodeUpdateRequest {
region?: string
}
export interface ProxyNodeInstallSessionCreateRequest {
node_name: string
}
export interface ProxyNodeInstallSession {
install_code: string
expires_at_unix_secs: number
expires_in_seconds: number
node_name: string
aether_url: string
unix_command: string
powershell_command: string
}
export interface ProxyNodeTestResult {
success: boolean
latency_ms: number | null
@@ -245,6 +259,11 @@ export const proxyNodesApi = {
return response.data
},
async createInstallSession(data: ProxyNodeInstallSessionCreateRequest): Promise<ProxyNodeInstallSession> {
const response = await apiClient.post<ProxyNodeInstallSession>('/api/admin/proxy-nodes/install-sessions', data)
return response.data
},
async updateManualNode(nodeId: string, data: ManualProxyNodeUpdateRequest): Promise<{ node_id: string; node: ProxyNode }> {
const response = await apiClient.patch<{ node_id: string; node: ProxyNode }>(`/api/admin/proxy-nodes/${nodeId}`, data)
return response.data