aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2019-01-02 20:21:08 -0600
committerSamuel Holland <samuel@sholland.org>2019-01-02 20:21:08 -0600
commit9d5192e01cb60f1dddffc820acac051eb7760180 (patch)
tree67722470e1882a9b02c9d4df0217805f31c64a63
parentUpdate copyright (diff)
downloadwireguard-android-sh/private-ips-fix.tar.xz
wireguard-android-sh/private-ips-fix.zip
PeerProxy: Only add IPv4 DNS servers when excluding private IPssh/private-ips-fix
Reported-By: Christophe-Marie Duquesne <chmd@chmd.fr>
-rw-r--r--app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java1
1 files changed, 1 insertions, 0 deletions
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 fa75908..7dc50f0 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<String> newDnsRoutes = Stream.of(Attribute.split(dnsServers))
+ .filter(server -> !server.contains(":"))
.map(server -> server + "/32")
.collect(Collectors.toUnmodifiableList());
if (allowedIpsState == AllowedIpsState.CONTAINS_IPV4_PUBLIC_NETWORKS) {