feat: Support custom delay timeout (#397)

This commit is contained in:
MystiPanda
2024-02-18 11:11:22 +08:00
committed by GitHub
parent 5106d77c77
commit d1d9620a61
12 changed files with 76 additions and 21 deletions

View File

@@ -160,9 +160,17 @@ export async function openWebUrl(url: string) {
return invoke<void>("open_web_url", { url });
}
export async function cmdGetProxyDelay(name: string, url?: string) {
export async function cmdGetProxyDelay(
name: string,
timeout: number,
url?: string
) {
name = encodeURIComponent(name);
return invoke<{ delay: number }>("clash_api_get_proxy_delay", { name, url });
return invoke<{ delay: number }>("clash_api_get_proxy_delay", {
name,
url,
timeout,
});
}
export async function cmdTestDelay(url: string) {