fix: unify default latency test URL and update workflows/backend logic
- All delay test logic, Rust MihomoManager, API, cmds, delay.ts, settings, and group editor now use the Cloudflare 204 test URL - Fixed outdated URLs in docs and comments - Fix Github Actions workflow: unexpected neeeds run
This commit is contained in:
@@ -454,7 +454,7 @@ export const GroupsEditorViewer = (props: Props) => {
|
||||
<ListItemText primary={t("Health Check Url")} />
|
||||
<TextField
|
||||
autoComplete="new-password"
|
||||
placeholder="https://www.gstatic.com/generate_204"
|
||||
placeholder="https://cp.cloudflare.com/generate_204"
|
||||
size="small"
|
||||
sx={{ width: "calc(100% - 150px)" }}
|
||||
{...field}
|
||||
|
||||
@@ -216,7 +216,7 @@ export const MiscViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
spellCheck="false"
|
||||
sx={{ width: 250, marginLeft: "auto" }}
|
||||
value={values.defaultLatencyTest}
|
||||
placeholder="https://www.gstatic.com/generate_204"
|
||||
placeholder="https://cp.cloudflare.com/generate_204"
|
||||
onChange={(e) =>
|
||||
setValues((v) => ({ ...v, defaultLatencyTest: e.target.value }))
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ export const getProxyDelay = async (
|
||||
) => {
|
||||
const params = {
|
||||
timeout: timeout || 10000,
|
||||
url: url || "https://www.gstatic.com/generate_204",
|
||||
url: url || "https://cp.cloudflare.com/generate_204",
|
||||
};
|
||||
const instance = await getAxios();
|
||||
const result = await instance.get(
|
||||
@@ -274,7 +274,7 @@ export const getGroupProxyDelays = async (
|
||||
) => {
|
||||
const params = {
|
||||
timeout: timeout || 10000,
|
||||
url: url || "https://www.gstatic.com/generate_204",
|
||||
url: url || "https://cp.cloudflare.com/generate_204",
|
||||
};
|
||||
|
||||
console.log(
|
||||
|
||||
@@ -183,7 +183,7 @@ export async function cmdGetProxyDelay(
|
||||
url?: string,
|
||||
) {
|
||||
// 确保URL不为空
|
||||
const testUrl = url || "https://www.gstatic.com/generate_204";
|
||||
const testUrl = url || "https://cp.cloudflare.com/generate_204";
|
||||
console.log(
|
||||
`[API] 调用延迟测试API,代理: ${name}, 超时: ${timeout}ms, URL: ${testUrl}`,
|
||||
);
|
||||
|
||||
@@ -23,7 +23,7 @@ class DelayManager {
|
||||
`[DelayManager] 获取测试URL,组: ${group}, URL: ${url || "未设置"}`,
|
||||
);
|
||||
// 如果未设置URL,返回默认URL
|
||||
return url || "https://www.gstatic.com/generate_204";
|
||||
return url || "https://cp.cloudflare.com/generate_204";
|
||||
}
|
||||
|
||||
setListener(name: string, group: string, listener: (time: number) => void) {
|
||||
|
||||
Reference in New Issue
Block a user