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/ZipImporter.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 'WireGuard/WireGuard/ZipArchive/ZipImporter.swift')
-rw-r--r-- | WireGuard/WireGuard/ZipArchive/ZipImporter.swift | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/WireGuard/WireGuard/ZipArchive/ZipImporter.swift b/WireGuard/WireGuard/ZipArchive/ZipImporter.swift index 0178ca0..a8819e2 100644 --- a/WireGuard/WireGuard/ZipArchive/ZipImporter.swift +++ b/WireGuard/WireGuard/ZipArchive/ZipImporter.swift @@ -43,12 +43,8 @@ class ZipImporter { if index > 0 && file == unarchivedFiles[index - 1] { continue } - guard let fileContents = String(data: file.contents, encoding: .utf8) else { - continue - } - guard let tunnelConfig = try? WgQuickConfigFileParser.parse(fileContents, name: file.fileBaseName) else { - continue - } + guard let fileContents = String(data: file.contents, encoding: .utf8) else { continue } + guard let tunnelConfig = try? TunnelConfiguration(fileContents, name: file.fileBaseName) else { continue } configs[index] = tunnelConfig } DispatchQueue.main.async { completion(.success(configs)) } |