mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
fix: update default latency test URL to use HTTPS
This commit is contained in:
@@ -88,6 +88,7 @@
|
|||||||
- 配置文件缺失 secret 字段时自动填充默认值 set-your-secret
|
- 配置文件缺失 secret 字段时自动填充默认值 set-your-secret
|
||||||
- 优化异步处理,防止部分组件 UI 阻塞
|
- 优化异步处理,防止部分组件 UI 阻塞
|
||||||
- 关闭 DNS 启用
|
- 关闭 DNS 启用
|
||||||
|
- 延迟测试链接更换为 Https 协议 https://www.gstatic.com/generate_204
|
||||||
|
|
||||||
#### 移除了:
|
#### 移除了:
|
||||||
- 窗口状态管理器
|
- 窗口状态管理器
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ impl MihomoManager {
|
|||||||
test_url: Option<String>,
|
test_url: Option<String>,
|
||||||
timeout: i32,
|
timeout: i32,
|
||||||
) -> Result<serde_json::Value, String> {
|
) -> Result<serde_json::Value, String> {
|
||||||
let test_url = test_url.unwrap_or("http://cp.cloudflare.com/generate_204".to_string());
|
let test_url = test_url.unwrap_or("https://www.gstatic.com/generate_204".to_string());
|
||||||
let url = format!(
|
let url = format!(
|
||||||
"{}/proxies/{}/delay?url={}&timeout={}",
|
"{}/proxies/{}/delay?url={}&timeout={}",
|
||||||
self.mihomo_server, name, test_url, timeout
|
self.mihomo_server, name, test_url, timeout
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ export const MiscViewer = forwardRef<DialogRef>((props, ref) => {
|
|||||||
spellCheck="false"
|
spellCheck="false"
|
||||||
sx={{ width: 250, marginLeft: "auto" }}
|
sx={{ width: 250, marginLeft: "auto" }}
|
||||||
value={values.defaultLatencyTest}
|
value={values.defaultLatencyTest}
|
||||||
placeholder="http://cp.cloudflare.com/generate_204"
|
placeholder="https://www.gstatic.com/generate_204"
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
setValues((v) => ({ ...v, defaultLatencyTest: e.target.value }))
|
setValues((v) => ({ ...v, defaultLatencyTest: e.target.value }))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export const getProxyDelay = async (
|
|||||||
) => {
|
) => {
|
||||||
const params = {
|
const params = {
|
||||||
timeout: timeout || 10000,
|
timeout: timeout || 10000,
|
||||||
url: url || "http://cp.cloudflare.com/generate_204",
|
url: url || "https://www.gstatic.com/generate_204",
|
||||||
};
|
};
|
||||||
const instance = await getAxios();
|
const instance = await getAxios();
|
||||||
const result = await instance.get(
|
const result = await instance.get(
|
||||||
@@ -274,7 +274,7 @@ export const getGroupProxyDelays = async (
|
|||||||
) => {
|
) => {
|
||||||
const params = {
|
const params = {
|
||||||
timeout: timeout || 10000,
|
timeout: timeout || 10000,
|
||||||
url: url || "http://cp.cloudflare.com/generate_204",
|
url: url || "https://www.gstatic.com/generate_204",
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ export async function cmdGetProxyDelay(
|
|||||||
url?: string,
|
url?: string,
|
||||||
) {
|
) {
|
||||||
// 确保URL不为空
|
// 确保URL不为空
|
||||||
const testUrl = url || "http://cp.cloudflare.com/generate_204";
|
const testUrl = url || "https://www.gstatic.com/generate_204";
|
||||||
console.log(
|
console.log(
|
||||||
`[API] 调用延迟测试API,代理: ${name}, 超时: ${timeout}ms, URL: ${testUrl}`,
|
`[API] 调用延迟测试API,代理: ${name}, 超时: ${timeout}ms, URL: ${testUrl}`,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class DelayManager {
|
|||||||
`[DelayManager] 获取测试URL,组: ${group}, URL: ${url || "未设置"}`,
|
`[DelayManager] 获取测试URL,组: ${group}, URL: ${url || "未设置"}`,
|
||||||
);
|
);
|
||||||
// 如果未设置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) {
|
setListener(name: string, group: string, listener: (time: number) => void) {
|
||||||
|
|||||||
Reference in New Issue
Block a user