From 210e2f40a143d1512fcf82bb629ba30bfcd79eb7 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Wed, 2 Jan 2019 20:21:08 -0600 Subject: PeerProxy: Only add IPv4 DNS servers when excluding private IPs Reported-By: Christophe-Marie Duquesne --- 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) { -- cgit v1.2.3