From 27cafd105232b3e30f58f32183db8aecc4908f89 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Tue, 2 Jun 2026 17:02:10 +0800 Subject: [PATCH] Deprecate allowInsecure and show warning toast https://github.com/2dust/v2rayNG/issues/5717 --- .../src/main/java/com/v2ray/ang/core/CoreServiceManager.kt | 5 +++++ V2rayNG/app/src/main/res/values-zh-rCN/strings.xml | 1 + V2rayNG/app/src/main/res/values/strings.xml | 1 + 3 files changed, 7 insertions(+) diff --git a/V2rayNG/app/src/main/java/com/v2ray/ang/core/CoreServiceManager.kt b/V2rayNG/app/src/main/java/com/v2ray/ang/core/CoreServiceManager.kt index e6acf965..7a1e2edb 100644 --- a/V2rayNG/app/src/main/java/com/v2ray/ang/core/CoreServiceManager.kt +++ b/V2rayNG/app/src/main/java/com/v2ray/ang/core/CoreServiceManager.kt @@ -18,6 +18,7 @@ import com.v2ray.ang.dto.entities.ProfileItem import com.v2ray.ang.enums.EConfigType import com.v2ray.ang.extension.isComplexType import com.v2ray.ang.extension.toast +import com.v2ray.ang.extension.toastError import com.v2ray.ang.handler.MmkvManager import com.v2ray.ang.handler.NotificationManager import com.v2ray.ang.handler.SettingsManager @@ -160,6 +161,10 @@ object CoreServiceManager { // val result = V2rayConfigUtil.getV2rayConfig(context, guid) // if (!result.status) error(result.errorMessage.ifBlank { "Failed to get V2Ray config" }) + if (config.insecure == true) { + context.toastError(R.string.toast_allow_insecure_deprecated) + } + if (MmkvManager.decodeSettingsBool(AppConfig.PREF_PROXY_SHARING)) { context.toast(R.string.toast_warning_pref_proxysharing_short) } else { diff --git a/V2rayNG/app/src/main/res/values-zh-rCN/strings.xml b/V2rayNG/app/src/main/res/values-zh-rCN/strings.xml index bcc48458..b7971476 100644 --- a/V2rayNG/app/src/main/res/values-zh-rCN/strings.xml +++ b/V2rayNG/app/src/main/res/values-zh-rCN/strings.xml @@ -120,6 +120,7 @@ 证书指纹 (SHA-256) 启用浏览器转发 仅支持 xhttp (packet-up) 和 ws。与优选域名冲突,utls, alpn, ech 等 TLS 设置将被忽略 + 警告: 当前已移除跳过证书验证 "allowInsecure" ,请改用证书指纹。否则启动将失败。 失败, 请使用文件管理器 diff --git a/V2rayNG/app/src/main/res/values/strings.xml b/V2rayNG/app/src/main/res/values/strings.xml index b8075557..38ebaaa2 100644 --- a/V2rayNG/app/src/main/res/values/strings.xml +++ b/V2rayNG/app/src/main/res/values/strings.xml @@ -121,6 +121,7 @@ Certificate fingerprint (SHA-256) Enable Browser Dialer Only supports xhttp (packet-up) and ws outbound; TLS-related settings may be ignored or conflict + Warning: The option to skip certificate verification "allowInsecure" has been removed in the current version. Please use certificate fingerprinting instead. File copy failed, please use File Manager