|
|
|
|
@ -38,7 +38,7 @@ public class OkHttp { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setDoh(Context context, Doh doh) { |
|
|
|
|
OkHttpClient dohClient = new OkHttpClient.Builder().cache(new Cache(new File(context.getCacheDir(), "http_cache"), CACHE)).build(); |
|
|
|
|
OkHttpClient dohClient = new OkHttpClient.Builder().cache(new Cache(new File(context.getCacheDir(), "http_cache"), CACHE)).hostnameVerifier(SSLSocketFactoryCompat.hostnameVerifier).sslSocketFactory(new SSLSocketFactoryCompat(), SSLSocketFactoryCompat.trustAllCert).build(); |
|
|
|
|
dns = doh.getUrl().isEmpty() ? null : new DnsOverHttps.Builder().client(dohClient).url(HttpUrl.get(doh.getUrl())).bootstrapDnsHosts(doh.getHosts()).build(); |
|
|
|
|
client = null; |
|
|
|
|
noRedirect = null; |
|
|
|
|
|