Removing DoH
parent
e43e4d883f
commit
94c6852b62
|
@ -53,15 +53,15 @@ class Upstream : ExtractorApi() {
|
||||||
Log.d("mnemo", "Upstream extractor enabled")
|
Log.d("mnemo", "Upstream extractor enabled")
|
||||||
|
|
||||||
// Bypass ISP blocking with DNS over HTTP to resolve the IP for upstream
|
// Bypass ISP blocking with DNS over HTTP to resolve the IP for upstream
|
||||||
val dnsDoc = app.get(
|
// val dnsDoc = app.get(
|
||||||
"https://cloudflare-dns.com/dns-query?name=upstream.to&type=A",
|
// "https://cloudflare-dns.com/dns-query?name=upstream.to&type=A",
|
||||||
headers = mapOf(
|
// headers = mapOf(
|
||||||
"accept" to "application/dns-json"
|
// "accept" to "application/dns-json"
|
||||||
)
|
// )
|
||||||
).text
|
// ).text
|
||||||
|
|
||||||
// Parse JSON string to ApiResponse object
|
// Parse JSON string to ApiResponse object
|
||||||
val apiResponse = Json.decodeFromString<ApiResponse>(dnsDoc)
|
// val apiResponse = Json.decodeFromString<ApiResponse>(dnsDoc)
|
||||||
|
|
||||||
// Extract the desired value
|
// Extract the desired value
|
||||||
// val ipAddress = if (apiResponse.Answer.isNotEmpty()) apiResponse.Answer[0].data else "185.178.208.135"
|
// val ipAddress = if (apiResponse.Answer.isNotEmpty()) apiResponse.Answer[0].data else "185.178.208.135"
|
||||||
|
|
Loading…
Reference in New Issue