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.
This commit is contained in:
Chuangbo Li 2025-02-04 23:44:55 +08:00
parent b55bfca7de
commit 4f39f282ab
3 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ func (s *HistoryStorage) Close() error {
func URLTest(ctx context.Context, link string, detour N.Dialer) (t uint16, err error) { func URLTest(ctx context.Context, link string, detour N.Dialer) (t uint16, err error) {
if link == "" { if link == "" {
link = "https://www.gstatic.com/generate_204" link = "http://cp.cloudflare.com/generate_204"
} }
linkURL, err := url.Parse(link) linkURL, err := url.Parse(link)
if err != nil { if err != nil {

View File

@ -28,7 +28,7 @@ List of outbound tags to test.
#### url #### 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 #### interval

View File

@ -28,7 +28,7 @@
#### url #### url
用于测试的链接。默认使用 `https://www.gstatic.com/generate_204`。 用于测试的链接。默认使用 `http://cp.cloudflare.com/generate_204`。
#### interval #### interval