Bugged update - hard debug
parent
b200c0144b
commit
70012f968e
|
@ -51,21 +51,22 @@ class Upstream : ExtractorApi() {
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
Log.d("mnemo", "Upstream extractor enabled")
|
Log.d("mnemo", "Upstream extractor enabled")
|
||||||
Log.d("mnemo", "Test-2")
|
Log.d("mnemo", "Test-3")
|
||||||
|
|
||||||
// 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
|
||||||
var ipAddress = if (apiResponse.Answer.isNotEmpty()) apiResponse.Answer[0].data else "185.178.208.135"
|
// var ipAddress = if (apiResponse.Answer.isNotEmpty()) apiResponse.Answer[0].data else "185.178.208.135"
|
||||||
|
var ipAddress = "185.178.208.135"
|
||||||
Log.d("mnemo", "IP ${ipAddress}")
|
Log.d("mnemo", "IP ${ipAddress}")
|
||||||
|
|
||||||
// Connect to upstream using the IP and set the Host header
|
// Connect to upstream using the IP and set the Host header
|
||||||
|
|
Loading…
Reference in New Issue