mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
Merge pull request #458 from RWDai/opencode/sunny-orchid
Add one-click proxy node installation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user