From fb4f1e30d55b91e031a1b206dafa2687b9f2d522 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Wed, 2 Jan 2019 20:21:08 -0600 Subject: [PATCH] PeerProxy: Only add IPv4 DNS servers when excluding private IPs Reported-By: Christophe-Marie Duquesne Signed-off-by: Jason A. Donenfeld --- app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java b/app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java index 6336abab..06958124 100644 --- a/app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java +++ b/app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java @@ -226,6 +226,7 @@ public class PeerProxy extends BaseObservable implements Parcelable { private void setInterfaceDns(final CharSequence dnsServers) { final List newDnsRoutes = Stream.of(Attribute.split(dnsServers)) + .filter(server -> !server.contains(":")) .map(server -> server + "/32") .collect(Collectors.toUnmodifiableList()); if (allowedIpsState == AllowedIpsState.CONTAINS_IPV4_PUBLIC_NETWORKS) {