Preserve DNS search domains (#344)

This commit is contained in:
Roy Orbitson 2024-09-07 12:31:59 +09:30 committed by GitHub
parent b2a2b9fcf4
commit 6e961e0994
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -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()