fix: update default latency test URL to use HTTPS

This commit is contained in:
Tunglies
2025-06-02 12:41:41 +08:00
parent a36d2633c9
commit d5c0b09a2f
6 changed files with 7 additions and 6 deletions

View File

@@ -216,7 +216,7 @@ export const MiscViewer = forwardRef<DialogRef>((props, ref) => {
spellCheck="false"
sx={{ width: 250, marginLeft: "auto" }}
value={values.defaultLatencyTest}
placeholder="http://cp.cloudflare.com/generate_204"
placeholder="https://www.gstatic.com/generate_204"
onChange={(e) =>
setValues((v) => ({ ...v, defaultLatencyTest: e.target.value }))
}

View File

@@ -83,7 +83,7 @@ export const getProxyDelay = async (
) => {
const params = {
timeout: timeout || 10000,
url: url || "http://cp.cloudflare.com/generate_204",
url: url || "https://www.gstatic.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 || "http://cp.cloudflare.com/generate_204",
url: url || "https://www.gstatic.com/generate_204",
};
console.log(

View File

@@ -183,7 +183,7 @@ export async function cmdGetProxyDelay(
url?: string,
) {
// 确保URL不为空
const testUrl = url || "http://cp.cloudflare.com/generate_204";
const testUrl = url || "https://www.gstatic.com/generate_204";
console.log(
`[API] 调用延迟测试API代理: ${name}, 超时: ${timeout}ms, URL: ${testUrl}`,
);

View File

@@ -23,7 +23,7 @@ class DelayManager {
`[DelayManager] 获取测试URL组: ${group}, URL: ${url || "未设置"}`,
);
// 如果未设置URL返回默认URL
return url || "http://cp.cloudflare.com/generate_204";
return url || "https://www.gstatic.com/generate_204";
}
setListener(name: string, group: string, listener: (time: number) => void) {