Tachidesk: bypass DoH (#14184)
* Tachidesk: Bypass DoH * bump version * fix imports
This commit is contained in:
parent
d04de13a34
commit
90915c6883
|
@ -6,7 +6,7 @@ ext {
|
|||
extName = 'Tachidesk'
|
||||
pkgNameSuffix = 'all.tachidesk'
|
||||
extClass = '.Tachidesk'
|
||||
extVersionCode = 6
|
||||
extVersionCode = 7
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -21,7 +21,9 @@ import eu.kanade.tachiyomi.source.online.HttpSource
|
|||
import kotlinx.serialization.decodeFromString
|
||||
import kotlinx.serialization.json.Json
|
||||
import okhttp3.Credentials
|
||||
import okhttp3.Dns
|
||||
import okhttp3.Headers
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import rx.Observable
|
||||
|
@ -43,6 +45,11 @@ class Tachidesk : ConfigurableSource, UnmeteredSource, HttpSource() {
|
|||
|
||||
private val json: Json by injectLazy()
|
||||
|
||||
override val client: OkHttpClient =
|
||||
network.client.newBuilder()
|
||||
.dns(Dns.SYSTEM) // don't use DNS over HTTPS as it breaks IP addressing
|
||||
.build()
|
||||
|
||||
override fun headersBuilder(): Headers.Builder = Headers.Builder().apply {
|
||||
if (basePassword.isNotEmpty() && baseLogin.isNotEmpty()) {
|
||||
val credentials = Credentials.basic(baseLogin, basePassword)
|
||||
|
|
Loading…
Reference in New Issue