Deprecate allowInsecure and show warning toast

https://github.com/2dust/v2rayNG/issues/5717
This commit is contained in:
2dust
2026-06-02 17:02:10 +08:00
parent a155b24c1e
commit 27cafd1052
3 changed files with 7 additions and 0 deletions
@@ -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 {
@@ -120,6 +120,7 @@
<string name="server_lab_pinned_ca256">证书指纹 (SHA-256)</string>
<string name="server_lab_browser_dialer">启用浏览器转发</string>
<string name="server_lab_browser_dialer_tip">仅支持 xhttp (packet-up) 和 ws。与优选域名冲突,utls, alpn, ech 等 TLS 设置将被忽略</string>
<string name="toast_allow_insecure_deprecated">警告: 当前已移除跳过证书验证 "allowInsecure" ,请改用证书指纹。否则启动将失败。 </string>
<!-- UserAssetActivity -->
<string name="toast_asset_copy_failed">失败, 请使用文件管理器</string>
@@ -121,6 +121,7 @@
<string name="server_lab_pinned_ca256">Certificate fingerprint (SHA-256)</string>
<string name="server_lab_browser_dialer">Enable Browser Dialer</string>
<string name="server_lab_browser_dialer_tip">Only supports xhttp (packet-up) and ws outbound; TLS-related settings may be ignored or conflict</string>
<string name="toast_allow_insecure_deprecated">Warning: The option to skip certificate verification "allowInsecure" has been removed in the current version. Please use certificate fingerprinting instead.</string>
<!-- UserAssetActivity -->
<string name="toast_asset_copy_failed">File copy failed, please use File Manager</string>