diff options
author | Eric Kuck <eric@bluelinelabs.com> | 2018-12-21 15:16:09 -0600 |
---|---|---|
committer | Eric Kuck <eric@bluelinelabs.com> | 2018-12-21 16:32:08 -0600 |
commit | 1fecd8eb6c5c2327d4bfd5044876be12876fc7e5 (patch) | |
tree | 45c7f4c552eb01bd15c54e58615c9122acc99e83 /WireGuard/WireGuard/ZipArchive/ZipExporter.swift | |
parent | Do not require NetworkExtension to know its own name (diff) | |
download | wireguard-apple-1fecd8eb6c5c2327d4bfd5044876be12876fc7e5.tar.xz wireguard-apple-1fecd8eb6c5c2327d4bfd5044876be12876fc7e5.zip |
providerConfiguration is now a WgQuickConfig
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/ZipArchive/ZipExporter.swift | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/WireGuard/WireGuard/ZipArchive/ZipExporter.swift b/WireGuard/WireGuard/ZipArchive/ZipExporter.swift index 33d62fd..052242a 100644 --- a/WireGuard/WireGuard/ZipArchive/ZipExporter.swift +++ b/WireGuard/WireGuard/ZipArchive/ZipExporter.swift @@ -22,8 +22,8 @@ class ZipExporter { var inputsToArchiver: [(fileName: String, contents: Data)] = [] var lastTunnelName: String = "" for tunnelConfiguration in tunnelConfigurations { - if let contents = WgQuickConfigFileWriter.writeConfigFile(from: tunnelConfiguration) { - let name = tunnelConfiguration.interface.name + if let contents = tunnelConfiguration.asWgQuickConfig().data(using: .utf8) { + let name = tunnelConfiguration.interface.name ?? "" if name.isEmpty || name == lastTunnelName { continue } inputsToArchiver.append((fileName: "\(name).conf", contents: contents)) lastTunnelName = name |