From d9fb121d67f69a58ea46ab60b5fe6b384be8ea6d Mon Sep 17 00:00:00 2001 From: yuhan6665 <1588741+yuhan6665@users.noreply.github.com> Date: Fri, 3 Sep 2021 18:13:13 -0400 Subject: [PATCH] Fix sniffing default value again I made a mistake, thought it would return null when key is not in storage, But it is found default "true" must be specified --- .../app/src/main/kotlin/com/v2ray/ang/util/V2rayConfigUtil.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/V2rayConfigUtil.kt b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/V2rayConfigUtil.kt index 8de0f558a..8b1013100 100644 --- a/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/V2rayConfigUtil.kt +++ b/V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/V2rayConfigUtil.kt @@ -101,7 +101,7 @@ object V2rayConfigUtil { v2rayConfig.inbounds[0].port = 10808 val fakedns = settingsStorage?.decodeBool(AppConfig.PREF_FAKE_DNS_ENABLED) ?: false - val sniffAllTlsAndHttp = settingsStorage?.decodeBool(AppConfig.PREF_SNIFFING_ENABLED) + val sniffAllTlsAndHttp = settingsStorage?.decodeBool(AppConfig.PREF_SNIFFING_ENABLED, true) ?: true v2rayConfig.inbounds[0].sniffing?.enabled = fakedns || sniffAllTlsAndHttp if (!sniffAllTlsAndHttp) {