From 69b65d06a4cd0988f28ed52f91c13c833583b0dc Mon Sep 17 00:00:00 2001 From: MystiPanda Date: Sat, 1 Jun 2024 23:14:47 +0800 Subject: [PATCH] chore: change default test url --- src-tauri/src/core/clash_api.rs | 2 +- src/components/setting/mods/misc-viewer.tsx | 2 +- src/services/api.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src-tauri/src/core/clash_api.rs b/src-tauri/src/core/clash_api.rs index 79a5e55e..55da727f 100644 --- a/src-tauri/src/core/clash_api.rs +++ b/src-tauri/src/core/clash_api.rs @@ -52,7 +52,7 @@ pub async fn get_proxy_delay( let (url, headers) = clash_client_info()?; let url = format!("{url}/proxies/{name}/delay"); - let default_url = "http://1.1.1.1"; + let default_url = "http://www.apple.com/library/test/success.html"; let test_url = test_url .map(|s| if s.is_empty() { default_url.into() } else { s }) .unwrap_or(default_url.into()); diff --git a/src/components/setting/mods/misc-viewer.tsx b/src/components/setting/mods/misc-viewer.tsx index 6e2de5eb..77451ff6 100644 --- a/src/components/setting/mods/misc-viewer.tsx +++ b/src/components/setting/mods/misc-viewer.tsx @@ -189,7 +189,7 @@ export const MiscViewer = forwardRef((props, ref) => { spellCheck="false" sx={{ width: 250 }} value={values.defaultLatencyTest} - placeholder="http://1.1.1.1" + placeholder="http://www.apple.com/library/test/success.html" onChange={(e) => setValues((v) => ({ ...v, defaultLatencyTest: e.target.value })) } diff --git a/src/services/api.ts b/src/services/api.ts index bded6e32..7d151e83 100644 --- a/src/services/api.ts +++ b/src/services/api.ts @@ -82,7 +82,7 @@ export const getProxyDelay = async ( ) => { const params = { timeout: timeout || 10000, - url: url || "http://1.1.1.1", + url: url || "http://www.apple.com/library/test/success.html", }; const instance = await getAxios(); const result = await instance.get( @@ -250,7 +250,7 @@ export const getGroupProxyDelays = async ( ) => { const params = { timeout: timeout || 10000, - url: url || "http://1.1.1.1", + url: url || "http://www.apple.com/library/test/success.html", }; const instance = await getAxios(); const result = await instance.get(