From 2504ec79ee86ca794e6adf463cbbc1aa44f0f3e0 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Tue, 14 May 2024 10:53:15 +0800 Subject: [PATCH] Change delayed test URL https://github.com/2dust/v2rayNG/issues/3110 --- V2rayNG/app/src/main/kotlin/com/v2ray/ang/AppConfig.kt | 2 +- .../app/src/main/kotlin/com/v2ray/ang/util/SpeedtestUtil.kt | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/AppConfig.kt b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/AppConfig.kt index f423a224..cf2cb340 100644 --- a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/AppConfig.kt +++ b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/AppConfig.kt @@ -99,7 +99,7 @@ object AppConfig { const val PromotionUrl = "aHR0cHM6Ly85LjIzNDQ1Ni54eXovYWJjLmh0bWw=" const val GeoUrl = "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/" const val TgChannelUrl = "https://t.me/github_2dust" - const val DelayTestUrl = "https://www.google.com/generate_204" + const val DelayTestUrl = "https://www.gstatic.com/generate_204" const val DNS_PROXY = "1.1.1.1" const val DNS_DIRECT = "223.5.5.5" diff --git a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/SpeedtestUtil.kt b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/SpeedtestUtil.kt index 1adfda65..eec61573 100644 --- a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/SpeedtestUtil.kt +++ b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/SpeedtestUtil.kt @@ -102,9 +102,7 @@ object SpeedtestUtil { var conn: HttpURLConnection? = null try { - val url = URL("https", - "www.google.com", - "/generate_204") + val url = URL(Utils.getDelayTestUrl()) conn = url.openConnection( Proxy(Proxy.Type.HTTP,