From 4f39f282abb5191eaee82d972de1c8becf2791e7 Mon Sep 17 00:00:00 2001 From: Chuangbo Li Date: Tue, 4 Feb 2025 23:44:55 +0800 Subject: [PATCH] chore: change default speed test URL to Cloudflare This commit updates the default speed test URL from Google's generate_204 to Cloudflare's generate_204. The rationale behind this change is that Cloudflare's generate_204 has been observed to offer faster response times compared to Google's, resulting in potentially quicker and more accurate speed tests for users. While this change is expected to improve the user experience, users who prefer the previous URL can still easily configure it manually in their sing-box settings. --- common/urltest/urltest.go | 2 +- docs/configuration/outbound/urltest.md | 2 +- docs/configuration/outbound/urltest.zh.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/urltest/urltest.go b/common/urltest/urltest.go index cfe1e532..2eb0b1f9 100644 --- a/common/urltest/urltest.go +++ b/common/urltest/urltest.go @@ -75,7 +75,7 @@ func (s *HistoryStorage) Close() error { func URLTest(ctx context.Context, link string, detour N.Dialer) (t uint16, err error) { if link == "" { - link = "https://www.gstatic.com/generate_204" + link = "http://cp.cloudflare.com/generate_204" } linkURL, err := url.Parse(link) if err != nil { diff --git a/docs/configuration/outbound/urltest.md b/docs/configuration/outbound/urltest.md index f4b3b0aa..07ddd8ae 100644 --- a/docs/configuration/outbound/urltest.md +++ b/docs/configuration/outbound/urltest.md @@ -28,7 +28,7 @@ List of outbound tags to test. #### url -The URL to test. `https://www.gstatic.com/generate_204` will be used if empty. +The URL to test. `http://cp.cloudflare.com/generate_204` will be used if empty. #### interval diff --git a/docs/configuration/outbound/urltest.zh.md b/docs/configuration/outbound/urltest.zh.md index 4372298a..52929eef 100644 --- a/docs/configuration/outbound/urltest.zh.md +++ b/docs/configuration/outbound/urltest.zh.md @@ -28,7 +28,7 @@ #### url -用于测试的链接。默认使用 `https://www.gstatic.com/generate_204`。 +用于测试的链接。默认使用 `http://cp.cloudflare.com/generate_204`。 #### interval