diff --git a/app/build.gradle b/app/build.gradle index e77516719..f3faa0394 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -154,7 +154,7 @@ dependencies { implementation 'org.jsoup:jsoup:1.10.2' // Job scheduling - implementation 'com.evernote:android-job:1.2.4' + implementation 'com.evernote:android-job:1.2.5' implementation 'com.google.android.gms:play-services-gcm:11.8.0' // Changelog diff --git a/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt index 97d4b4d7d..5e9389483 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt @@ -3,7 +3,10 @@ package eu.kanade.tachiyomi.network import android.content.Context import android.os.Build import okhttp3.Cache +import okhttp3.CipherSuite +import okhttp3.ConnectionSpec import okhttp3.OkHttpClient +import okhttp3.TlsVersion import java.io.File import java.io.IOException import java.net.InetAddress @@ -108,6 +111,18 @@ class NetworkHelper(context: Context) { sslSocketFactory(TLSSocketFactory(), trustManagers[0] as X509TrustManager) } + val specCompat = ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS) + .tlsVersions(TlsVersion.TLS_1_2, TlsVersion.TLS_1_1, TlsVersion.TLS_1_0) + .cipherSuites( + *ConnectionSpec.MODERN_TLS.cipherSuites().orEmpty().toTypedArray(), + CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + CipherSuite.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA + ) + .build() + + val specs = listOf(specCompat, ConnectionSpec.CLEARTEXT) + connectionSpecs(specs) + return this } }