diff options
author | cyberta <cyberta@riseup.net> | 2021-02-18 13:46:49 +0000 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2021-02-18 13:46:49 +0000 |
commit | 2b1dcf4f6b4ed7405a14c5dfb50ef16dfa416fbf (patch) | |
tree | 67efca7589d9834e79d7b72069c661edda17593b /app/src/main/java/se/leap/bitmaskclient/providersetup/connectivity | |
parent | efd90a35caf042d7955727e4a5d9a12927714ca8 (diff) | |
parent | e5d71c8dd60f10a5fcb9dbeab3158207932905e2 (diff) |
Merge branch 'massive_error_logging' into 'master'
API error logging
See merge request leap/bitmask_android!127
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/providersetup/connectivity')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/providersetup/connectivity/DnsResolver.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/connectivity/DnsResolver.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/connectivity/DnsResolver.java index c5100a67..5655e7b7 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/connectivity/DnsResolver.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/connectivity/DnsResolver.java @@ -7,6 +7,7 @@ import java.net.UnknownHostException; import java.util.ArrayList; import java.util.List; +import de.blinkt.openvpn.core.VpnStatus; import okhttp3.Dns; import se.leap.bitmaskclient.base.models.Provider; import se.leap.bitmaskclient.base.models.ProviderObservable; @@ -28,10 +29,12 @@ class DnsResolver implements Dns { } String ip = currentProvider.getIpForHostname(hostname); if (!ip.isEmpty()) { + VpnStatus.logWarning("[API] Normal DNS resolution for " + hostname + " seems to be blocked. Circumventing."); ArrayList<InetAddress> addresses = new ArrayList<>(); addresses.add(InetAddress.getByAddress(hostname, IPAddress.asBytes(ip))); return addresses; } else { + VpnStatus.logWarning("[API] Could not resolve DNS for " + hostname); throw new UnknownHostException("Hostname " + hostname + " not found"); } } |