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'
|
extName = 'Tachidesk'
|
||||||
pkgNameSuffix = 'all.tachidesk'
|
pkgNameSuffix = 'all.tachidesk'
|
||||||
extClass = '.Tachidesk'
|
extClass = '.Tachidesk'
|
||||||
extVersionCode = 6
|
extVersionCode = 7
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -21,7 +21,9 @@ import eu.kanade.tachiyomi.source.online.HttpSource
|
||||||
import kotlinx.serialization.decodeFromString
|
import kotlinx.serialization.decodeFromString
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import okhttp3.Credentials
|
import okhttp3.Credentials
|
||||||
|
import okhttp3.Dns
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
|
@ -43,6 +45,11 @@ class Tachidesk : ConfigurableSource, UnmeteredSource, HttpSource() {
|
||||||
|
|
||||||
private val json: Json by injectLazy()
|
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 {
|
override fun headersBuilder(): Headers.Builder = Headers.Builder().apply {
|
||||||
if (basePassword.isNotEmpty() && baseLogin.isNotEmpty()) {
|
if (basePassword.isNotEmpty() && baseLogin.isNotEmpty()) {
|
||||||
val credentials = Credentials.basic(baseLogin, basePassword)
|
val credentials = Credentials.basic(baseLogin, basePassword)
|
||||||
|
|
Loading…
Reference in New Issue