From 6e961e0994d1d7ac6e5eb02ff21a89253aff4ec2 Mon Sep 17 00:00:00 2001 From: Roy Orbitson Date: Sat, 7 Sep 2024 12:31:59 +0930 Subject: [PATCH] Preserve DNS search domains (#344) --- .../ui/screens/config/model/InterfaceProxy.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/config/model/InterfaceProxy.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/config/model/InterfaceProxy.kt index 88ec2dc..2b4872e 100644 --- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/config/model/InterfaceProxy.kt +++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/config/model/InterfaceProxy.kt @@ -25,7 +25,10 @@ data class InterfaceProxy( publicKey = i.keyPair.publicKey.toBase64().trim(), privateKey = i.keyPair.privateKey.toBase64().trim(), addresses = i.addresses.joinToString(", ").trim(), - dnsServers = i.dnsServers.joinToString(", ").replace("/", "").trim(), + dnsServers = listOf( + i.dnsServers.joinToString(", ").replace("/", "").trim(), + i.dnsSearchDomains.joinToString(", ").trim(), + ).filter { it.length > 0 } .joinToString(", "), listenPort = if (i.listenPort.isPresent) { i.listenPort.get().toString().trim()