Export: fix up export format
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
3611f8cf5a
commit
c5e35fee1e
|
@ -22,10 +22,9 @@ class WgQuickConfigFileWriter {
|
|||
if let mtu = interface.mtu {
|
||||
output.append("MTU = \(mtu)\n")
|
||||
}
|
||||
output.append("\n")
|
||||
|
||||
for peer in tc.peers {
|
||||
output.append("[Peer]\n")
|
||||
output.append("\n[Peer]\n")
|
||||
output.append("PublicKey = \(peer.publicKey.base64EncodedString())\n")
|
||||
if let preSharedKey = peer.preSharedKey {
|
||||
output.append("PresharedKey = \(preSharedKey.base64EncodedString())\n")
|
||||
|
@ -40,7 +39,6 @@ class WgQuickConfigFileWriter {
|
|||
if let persistentKeepAlive = peer.persistentKeepAlive {
|
||||
output.append("PersistentKeepalive = \(persistentKeepAlive)\n")
|
||||
}
|
||||
output.append("\n")
|
||||
}
|
||||
|
||||
return output.data(using: .utf8)
|
||||
|
|
Loading…
Reference in New Issue