feat: enhance latency test logging and error handling

This commit is contained in:
wonfen
2025-03-09 04:22:34 +08:00
parent f18202a3a4
commit e1905aced4
5 changed files with 219 additions and 51 deletions

View File

@@ -48,7 +48,7 @@ export const ProxyHead = (props: Props) => {
useEffect(() => {
delayManager.setUrl(
groupName,
testUrl || url || verge?.default_latency_test!
testUrl || url || verge?.default_latency_test!,
);
}, [groupName, testUrl, verge?.default_latency_test]);
@@ -68,8 +68,10 @@ export const ProxyHead = (props: Props) => {
color="inherit"
title={t("Delay check")}
onClick={() => {
console.log(`[ProxyHead] 点击延迟测试按钮,组: ${groupName}`);
// Remind the user that it is custom test url
if (testUrl?.trim() && textState !== "filter") {
console.log(`[ProxyHead] 使用自定义测试URL: ${testUrl}`);
onHeadState({ textState: "url" });
}
props.onCheckDelay();