Refine proxy routing and UI state handling

This commit is contained in:
2026-07-08 12:41:12 +03:00
parent 6439dbfeaa
commit ae13070eba
9 changed files with 1100 additions and 558 deletions
+23 -2
View File
@@ -75,6 +75,27 @@ export interface PingServerResponse {
error?: string;
}
export interface ProxyProbeResponse {
id: string;
name: string;
url: string;
ok: boolean;
status?: number;
latency?: number;
ip?: string;
error?: string;
}
export interface ProxyTargetCheckResponse {
tag: string;
server: string;
serverPort: number;
ok: boolean;
latency?: number;
error?: string;
probes: ProxyProbeResponse[];
}
export interface GenerateSingBoxConfigResponse {
success: boolean;
message: string;
@@ -184,8 +205,8 @@ export function pingAllSingBoxServers(): Promise<PingServerResponse[]> {
return invoke<PingServerResponse[]>('ping_all_singbox_servers');
}
export function pingProxyTarget(host: string, port: number): Promise<PingServerResponse> {
return invoke<PingServerResponse>('ping_proxy_target', {
export function pingProxyTarget(host: string, port: number): Promise<ProxyTargetCheckResponse> {
return invoke<ProxyTargetCheckResponse>('ping_proxy_target', {
input: { host, port },
});
}