feat: Support custom delay timeout (#397)

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

No files matched your search

+10 -2
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) {