Fix DNS issues: Add 4 DoH servers with fallback, remove ineffective DNSSetter
- Remove DNSSetter.java (System.setProperty doesn't affect Android DNS) - Update NetworkUtils with 4 DNS over HTTPS providers: * Google DNS (8.8.8.8) - Primary * Cloudflare (1.1.1.1) - Secondary * AdGuard (94.140.14.14) - Tertiary * Quad9 (9.9.9.9) - Quaternary - Update DeviceRegistry to use NetworkUtils client - Update UpdateManager to use NetworkUtils client - Remove DNSSetter call from PlayerActivity This ensures the app works even when ISPs block specific DNS servers.
This commit is contained in:
@@ -15,7 +15,6 @@ import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.OkHttpClient;
|
||||
@@ -46,11 +45,8 @@ public class DeviceRegistry {
|
||||
|
||||
public DeviceRegistry(Context context) {
|
||||
this.appContext = context.getApplicationContext();
|
||||
this.httpClient = new OkHttpClient.Builder()
|
||||
.connectTimeout(10, TimeUnit.SECONDS)
|
||||
.readTimeout(15, TimeUnit.SECONDS)
|
||||
.callTimeout(20, TimeUnit.SECONDS)
|
||||
.build();
|
||||
// Usar NetworkUtils para obtener cliente con DNS over HTTPS configurado
|
||||
this.httpClient = NetworkUtils.getClient();
|
||||
this.executorService = Executors.newSingleThreadExecutor();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user