From 95b833c754175fc3bea39fa99b416b5828af41bc Mon Sep 17 00:00:00 2001 From: Andrej Mihajlov Date: Mon, 9 Nov 2020 10:52:06 +0100 Subject: [PATCH] iOS/macOS: Integrate WireGuardKit Signed-off-by: Andrej Mihajlov --- WireGuard/Shared/Logging/Logger.swift | 3 +- .../NETunnelProviderProtocol+Extension.swift | 1 + .../TunnelConfiguration+WgQuickConfig.swift | 1 + WireGuard/WireGuard.xcodeproj/project.pbxproj | 236 ++++++------------ .../contents.xcworkspacedata | 2 +- .../xcshareddata/swiftpm/Package.resolved | 16 ++ WireGuard/WireGuard/Crypto/Curve25519.swift | 1 + WireGuard/WireGuard/Tunnel/MockTunnels.swift | 1 + .../TunnelConfiguration+UapiConfig.swift | 1 + .../WireGuard/Tunnel/TunnelsManager.swift | 1 + WireGuard/WireGuard/UI/TunnelImporter.swift | 1 + WireGuard/WireGuard/UI/TunnelViewModel.swift | 1 + .../ViewController/QRScanViewController.swift | 1 + .../SettingsTableViewController.swift | 3 +- .../TunnelDetailTableViewController.swift | 1 + .../TunnelsListTableViewController.swift | 1 + .../WireGuard/UI/macOS/AppDelegate.swift | 3 +- .../macOS/ParseError+WireGuardAppError.swift | 1 + .../TunnelDetailTableViewController.swift | 1 + .../TunnelEditViewController.swift | 1 + .../WireGuard/WireGuard-Bridging-Header.h | 2 - .../WireGuard/ZipArchive/ZipExporter.swift | 1 + .../WireGuard/ZipArchive/ZipImporter.swift | 1 + .../PacketTunnelProvider.swift | 2 - ...ireGuardNetworkExtension-Bridging-Header.h | 2 - 25 files changed, 122 insertions(+), 163 deletions(-) create mode 100644 WireGuard/WireGuard.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/WireGuard/Shared/Logging/Logger.swift b/WireGuard/Shared/Logging/Logger.swift index 345fc10..eb144dc 100644 --- a/WireGuard/Shared/Logging/Logger.swift +++ b/WireGuard/Shared/Logging/Logger.swift @@ -3,6 +3,7 @@ import Foundation import os.log +import WireGuardKit public class Logger { enum LoggerError: Error { @@ -49,7 +50,7 @@ public class Logger { if let appBuild = Bundle.main.infoDictionary?["CFBundleVersion"] as? String { appVersion += " (\(appBuild))" } - let goBackendVersion = WIREGUARD_GO_VERSION + let goBackendVersion = getWireGuardVersion() Logger.global?.log(message: "App version: \(appVersion); Go backend version: \(goBackendVersion)") } } diff --git a/WireGuard/Shared/Model/NETunnelProviderProtocol+Extension.swift b/WireGuard/Shared/Model/NETunnelProviderProtocol+Extension.swift index 7828d81..c75e9c5 100644 --- a/WireGuard/Shared/Model/NETunnelProviderProtocol+Extension.swift +++ b/WireGuard/Shared/Model/NETunnelProviderProtocol+Extension.swift @@ -2,6 +2,7 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import NetworkExtension +import WireGuardKit enum PacketTunnelProviderError: String, Error { case savedProtocolConfigurationIsInvalid diff --git a/WireGuard/Shared/Model/TunnelConfiguration+WgQuickConfig.swift b/WireGuard/Shared/Model/TunnelConfiguration+WgQuickConfig.swift index 5e8f969..d0c87e0 100644 --- a/WireGuard/Shared/Model/TunnelConfiguration+WgQuickConfig.swift +++ b/WireGuard/Shared/Model/TunnelConfiguration+WgQuickConfig.swift @@ -2,6 +2,7 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import Foundation +import WireGuardKit extension TunnelConfiguration { diff --git a/WireGuard/WireGuard.xcodeproj/project.pbxproj b/WireGuard/WireGuard.xcodeproj/project.pbxproj index f5ab862..ec296ea 100644 --- a/WireGuard/WireGuard.xcodeproj/project.pbxproj +++ b/WireGuard/WireGuard.xcodeproj/project.pbxproj @@ -3,10 +3,16 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ + 5892BF8F255581F6000E678D /* WireGuardKit in Frameworks */ = {isa = PBXBuildFile; productRef = 5892BF8E255581F6000E678D /* WireGuardKit */; }; + 5892BFA025558288000E678D /* PacketTunnelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5892BF9F25558288000E678D /* PacketTunnelProvider.swift */; }; + 5892BFA125558288000E678D /* PacketTunnelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5892BF9F25558288000E678D /* PacketTunnelProvider.swift */; }; + 5892BFDB25593F79000E678D /* WireGuardKit in Frameworks */ = {isa = PBXBuildFile; productRef = 5892BFDA25593F79000E678D /* WireGuardKit */; }; + 5892BFDD25593F80000E678D /* WireGuardKit in Frameworks */ = {isa = PBXBuildFile; productRef = 5892BFDC25593F80000E678D /* WireGuardKit */; }; + 5892BFF325594742000E678D /* WireGuardKit in Frameworks */ = {isa = PBXBuildFile; productRef = 5892BFF225594742000E678D /* WireGuardKit */; }; 5F45417D21C1B23600994C13 /* UITableViewCell+Reuse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F45417C21C1B23600994C13 /* UITableViewCell+Reuse.swift */; }; 5F45418C21C2D48200994C13 /* TunnelEditKeyValueCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F45418B21C2D48200994C13 /* TunnelEditKeyValueCell.swift */; }; 5F45419021C2D53800994C13 /* SwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F45418F21C2D53800994C13 /* SwitchCell.swift */; }; @@ -24,14 +30,6 @@ 5F9696AE21CD6F72008063FE /* String+ArrayConversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F4541B121CBFAEE00994C13 /* String+ArrayConversion.swift */; }; 5F9696B021CD7128008063FE /* TunnelConfiguration+WgQuickConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F9696AF21CD7128008063FE /* TunnelConfiguration+WgQuickConfig.swift */; }; 5F9696B121CD7128008063FE /* TunnelConfiguration+WgQuickConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F9696AF21CD7128008063FE /* TunnelConfiguration+WgQuickConfig.swift */; }; - 5FF7B96221CC95DE00A7DD74 /* InterfaceConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF7B96121CC95DE00A7DD74 /* InterfaceConfiguration.swift */; }; - 5FF7B96321CC95DE00A7DD74 /* InterfaceConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF7B96121CC95DE00A7DD74 /* InterfaceConfiguration.swift */; }; - 5FF7B96521CC95FA00A7DD74 /* PeerConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF7B96421CC95FA00A7DD74 /* PeerConfiguration.swift */; }; - 5FF7B96621CC95FA00A7DD74 /* PeerConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF7B96421CC95FA00A7DD74 /* PeerConfiguration.swift */; }; - 6B586C53220CBA6D00427C51 /* Data+KeyEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B586C52220CBA6D00427C51 /* Data+KeyEncoding.swift */; }; - 6B586C54220CBA6D00427C51 /* Data+KeyEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B586C52220CBA6D00427C51 /* Data+KeyEncoding.swift */; }; - 6B586C55220CBA6D00427C51 /* Data+KeyEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B586C52220CBA6D00427C51 /* Data+KeyEncoding.swift */; }; - 6B586C56220CBA6D00427C51 /* Data+KeyEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B586C52220CBA6D00427C51 /* Data+KeyEncoding.swift */; }; 6B5C5E27220A48D30024272E /* Keychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B5C5E26220A48D30024272E /* Keychain.swift */; }; 6B5C5E28220A48D30024272E /* Keychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B5C5E26220A48D30024272E /* Keychain.swift */; }; 6B5C5E29220A48D30024272E /* Keychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B5C5E26220A48D30024272E /* Keychain.swift */; }; @@ -44,44 +42,35 @@ 6B6956362211DA80001B618A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B6956352211DA80001B618A /* main.m */; }; 6B707D8421F918D4000A8F73 /* TunnelConfiguration+UapiConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B707D8321F918D4000A8F73 /* TunnelConfiguration+UapiConfig.swift */; }; 6B707D8621F918D4000A8F73 /* TunnelConfiguration+UapiConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B707D8321F918D4000A8F73 /* TunnelConfiguration+UapiConfig.swift */; }; - 6BD5C97B220D1AE200784E08 /* key.c in Sources */ = {isa = PBXBuildFile; fileRef = 6BD5C979220D1AE100784E08 /* key.c */; }; - 6BD5C97C220D1AE200784E08 /* key.c in Sources */ = {isa = PBXBuildFile; fileRef = 6BD5C979220D1AE100784E08 /* key.c */; }; - 6BD5C97D220D1AE200784E08 /* key.c in Sources */ = {isa = PBXBuildFile; fileRef = 6BD5C979220D1AE100784E08 /* key.c */; }; - 6BD5C97E220D1AE200784E08 /* key.c in Sources */ = {isa = PBXBuildFile; fileRef = 6BD5C979220D1AE100784E08 /* key.c */; }; 6F0F44C9222D55BB00B0FF04 /* TextCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F0F44C8222D55BB00B0FF04 /* TextCell.swift */; }; 6F0F44CB222D55FD00B0FF04 /* EditableTextCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F0F44CA222D55FD00B0FF04 /* EditableTextCell.swift */; }; 6F1075642258AE9800D78929 /* DeleteTunnelsConfirmationAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F1075632258AE9800D78929 /* DeleteTunnelsConfirmationAlert.swift */; }; 6F19D30422402B8700A126F2 /* ConfirmationAlertPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F19D30322402B8700A126F2 /* ConfirmationAlertPresenter.swift */; }; 6F2449E8226587B90047B9E9 /* MacAppStoreUpdateDetector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F2449E7226587B80047B9E9 /* MacAppStoreUpdateDetector.swift */; }; - 6F3E02E9228000F6001FE7E3 /* MainMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F3E02E8228000F6001FE7E3 /* MainMenu.swift */; }; 6F29A9432278518D00DC6A6B /* RecentTunnelsTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F29A9422278518D00DC6A6B /* RecentTunnelsTracker.swift */; }; 6F29A94722787B1600DC6A6B /* QuickActionItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F29A94622787B1600DC6A6B /* QuickActionItem.swift */; }; + 6F3E02E9228000F6001FE7E3 /* MainMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F3E02E8228000F6001FE7E3 /* MainMenu.swift */; }; 6F4DD16B21DA558800690EAE /* TunnelListRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F4DD16A21DA558800690EAE /* TunnelListRow.swift */; }; 6F4DD16C21DA558F00690EAE /* NSTableView+Reuse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F4DD16721DA552B00690EAE /* NSTableView+Reuse.swift */; }; 6F4DD16E21DBEA0700690EAE /* ManageTunnelsRootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F4DD16D21DBEA0700690EAE /* ManageTunnelsRootViewController.swift */; }; 6F5A2B4621AFDED40081EDD8 /* FileManager+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F5A2B4421AFDE020081EDD8 /* FileManager+Extension.swift */; }; 6F5A2B4821AFF49A0081EDD8 /* FileManager+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F5A2B4421AFDE020081EDD8 /* FileManager+Extension.swift */; }; - 6F5D0C1D218352EF000F85AD /* PacketTunnelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F5D0C1C218352EF000F85AD /* PacketTunnelProvider.swift */; }; 6F5D0C22218352EF000F85AD /* WireGuardNetworkExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 6F5D0C1A218352EF000F85AD /* WireGuardNetworkExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 6F5EA59B223E58A8002B380A /* ButtonRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F5EA59A223E58A8002B380A /* ButtonRow.swift */; }; 6F613D9B21DE33B8004B217A /* KeyValueRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F613D9A21DE33B8004B217A /* KeyValueRow.swift */; }; 6F61F1E921B932F700483816 /* WireGuardAppError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F61F1E821B932F700483816 /* WireGuardAppError.swift */; }; 6F61F1EB21B937EF00483816 /* WireGuardResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F61F1EA21B937EF00483816 /* WireGuardResult.swift */; }; 6F628C3D217F09E9003482A3 /* TunnelViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F628C3C217F09E9003482A3 /* TunnelViewModel.swift */; }; - 6F628C3F217F3413003482A3 /* DNSServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F628C3E217F3413003482A3 /* DNSServer.swift */; }; 6F628C41217F47DB003482A3 /* TunnelDetailTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F628C40217F47DB003482A3 /* TunnelDetailTableViewController.swift */; }; 6F6483E7229293300075BA15 /* LaunchedAtLoginDetector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F6483E6229293300075BA15 /* LaunchedAtLoginDetector.swift */; }; 6F6899A62180447E0012E523 /* x25519.c in Sources */ = {isa = PBXBuildFile; fileRef = 6F6899A52180447E0012E523 /* x25519.c */; }; 6F6899A8218044FC0012E523 /* Curve25519.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F6899A7218044FC0012E523 /* Curve25519.swift */; }; - 6F693A562179E556008551C1 /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F693A552179E556008551C1 /* Endpoint.swift */; }; 6F70E20E221058E1008BDFB4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6F70E20C221058DF008BDFB4 /* InfoPlist.strings */; }; 6F70E20F221058E1008BDFB4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6F70E20C221058DF008BDFB4 /* InfoPlist.strings */; }; 6F70E23D22109E15008BDFB4 /* WireGuardLoginItemHelper.app in Embed Login Item Helper */ = {isa = PBXBuildFile; fileRef = 6F70E22922106A2D008BDFB4 /* WireGuardLoginItemHelper.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 6F7774E1217181B1006A79B3 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774DF217181B1006A79B3 /* MainViewController.swift */; }; 6F7774E2217181B1006A79B3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774E0217181B1006A79B3 /* AppDelegate.swift */; }; 6F7774E421718281006A79B3 /* TunnelsListTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774E321718281006A79B3 /* TunnelsListTableViewController.swift */; }; - 6F7774E82172020C006A79B3 /* TunnelConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774E72172020C006A79B3 /* TunnelConfiguration.swift */; }; - 6F7774EA217229DB006A79B3 /* IPAddressRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774E9217229DB006A79B3 /* IPAddressRange.swift */; }; 6F7774EF21722D97006A79B3 /* TunnelsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774EE21722D97006A79B3 /* TunnelsManager.swift */; }; 6F7774F321774263006A79B3 /* TunnelEditTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774F221774263006A79B3 /* TunnelEditTableViewController.swift */; }; 6F7F7E5F21C7D74B00527607 /* TunnelErrors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7F7E5E21C7D74B00527607 /* TunnelErrors.swift */; }; @@ -105,22 +94,12 @@ 6FB1BD6021D2607A00A991BF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FB1BD5F21D2607A00A991BF /* AppDelegate.swift */; }; 6FB1BD6221D2607E00A991BF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6FB1BD6121D2607E00A991BF /* Assets.xcassets */; }; 6FB1BD9921D4BFE700A991BF /* WireGuardNetworkExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 6FB1BD9121D4BFE600A991BF /* WireGuardNetworkExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 6FB1BDA121D4E00A00A991BF /* libwg-go.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FB1BDA021D4E00A00A991BF /* libwg-go.a */; }; 6FB1BDA221D4F53300A991BF /* ringlogger.c in Sources */ = {isa = PBXBuildFile; fileRef = 6FF3526C21C23F960008484E /* ringlogger.c */; }; 6FB1BDA421D4F53300A991BF /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FF3526E21C23FA10008484E /* Logger.swift */; }; 6FB1BDA521D4F53300A991BF /* TunnelConfiguration+WgQuickConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F9696AF21CD7128008063FE /* TunnelConfiguration+WgQuickConfig.swift */; }; 6FB1BDA621D4F53300A991BF /* NETunnelProviderProtocol+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FFA5D942194454A0001E2F7 /* NETunnelProviderProtocol+Extension.swift */; }; 6FB1BDA721D4F53300A991BF /* String+ArrayConversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F4541B121CBFAEE00994C13 /* String+ArrayConversion.swift */; }; - 6FB1BDA921D4F53300A991BF /* TunnelConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774E72172020C006A79B3 /* TunnelConfiguration.swift */; }; - 6FB1BDAA21D4F53300A991BF /* IPAddressRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774E9217229DB006A79B3 /* IPAddressRange.swift */; }; - 6FB1BDAB21D4F53300A991BF /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F693A552179E556008551C1 /* Endpoint.swift */; }; - 6FB1BDAC21D4F53300A991BF /* DNSServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F628C3E217F3413003482A3 /* DNSServer.swift */; }; - 6FB1BDAD21D4F53300A991BF /* InterfaceConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF7B96121CC95DE00A7DD74 /* InterfaceConfiguration.swift */; }; - 6FB1BDAE21D4F53300A991BF /* PeerConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF7B96421CC95FA00A7DD74 /* PeerConfiguration.swift */; }; 6FB1BDAF21D4F53300A991BF /* FileManager+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F5A2B4421AFDE020081EDD8 /* FileManager+Extension.swift */; }; - 6FB1BDB021D4F55700A991BF /* PacketTunnelProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F5D0C1C218352EF000F85AD /* PacketTunnelProvider.swift */; }; - 6FB1BDB121D4F55700A991BF /* PacketTunnelSettingsGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F5D0C472183C6A3000F85AD /* PacketTunnelSettingsGenerator.swift */; }; - 6FB1BDB221D4F55700A991BF /* DNSResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F5D0C1421832391000F85AD /* DNSResolver.swift */; }; 6FB1BDB321D4F55700A991BF /* ErrorNotifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FFA5D9F21958ECC0001E2F7 /* ErrorNotifier.swift */; }; 6FB1BDBB21D50F0200A991BF /* Localizable.strings in Sources */ = {isa = PBXBuildFile; fileRef = 6FE1765421C90BBE002690EA /* Localizable.strings */; }; 6FB1BDBC21D50F0200A991BF /* ringlogger.c in Sources */ = {isa = PBXBuildFile; fileRef = 6FF3526C21C23F960008484E /* ringlogger.c */; }; @@ -129,12 +108,6 @@ 6FB1BDBF21D50F0200A991BF /* TunnelConfiguration+WgQuickConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F9696AF21CD7128008063FE /* TunnelConfiguration+WgQuickConfig.swift */; }; 6FB1BDC021D50F0200A991BF /* NETunnelProviderProtocol+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FFA5D942194454A0001E2F7 /* NETunnelProviderProtocol+Extension.swift */; }; 6FB1BDC121D50F0200A991BF /* String+ArrayConversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F4541B121CBFAEE00994C13 /* String+ArrayConversion.swift */; }; - 6FB1BDC321D50F0300A991BF /* TunnelConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774E72172020C006A79B3 /* TunnelConfiguration.swift */; }; - 6FB1BDC421D50F0300A991BF /* IPAddressRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774E9217229DB006A79B3 /* IPAddressRange.swift */; }; - 6FB1BDC521D50F0300A991BF /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F693A552179E556008551C1 /* Endpoint.swift */; }; - 6FB1BDC621D50F0300A991BF /* DNSServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F628C3E217F3413003482A3 /* DNSServer.swift */; }; - 6FB1BDC721D50F0300A991BF /* InterfaceConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF7B96121CC95DE00A7DD74 /* InterfaceConfiguration.swift */; }; - 6FB1BDC821D50F0300A991BF /* PeerConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FF7B96421CC95FA00A7DD74 /* PeerConfiguration.swift */; }; 6FB1BDC921D50F0300A991BF /* FileManager+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F5A2B4421AFDE020081EDD8 /* FileManager+Extension.swift */; }; 6FB1BDCA21D50F1700A991BF /* x25519.c in Sources */ = {isa = PBXBuildFile; fileRef = 6F6899A52180447E0012E523 /* x25519.c */; }; 6FB1BDCB21D50F1700A991BF /* Curve25519.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F6899A7218044FC0012E523 /* Curve25519.swift */; }; @@ -168,7 +141,6 @@ 6FDB6D13224A15BF00EE4BC3 /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FDB6D12224A15BE00EE4BC3 /* LogViewController.swift */; }; 6FDB6D15224CB2CE00EE4BC3 /* LogViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FDB6D14224CB2CE00EE4BC3 /* LogViewCell.swift */; }; 6FDB6D18224CC05A00EE4BC3 /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FDB6D16224CC04E00EE4BC3 /* LogViewController.swift */; }; - 6FDEF7E421846C1A00D8FBF6 /* libwg-go.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6FDEF7E321846C1A00D8FBF6 /* libwg-go.a */; }; 6FDEF7E62185EFB200D8FBF6 /* QRScanViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FDEF7E52185EFAF00D8FBF6 /* QRScanViewController.swift */; }; 6FDEF7FB21863B6100D8FBF6 /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 6FDEF7F621863B6100D8FBF6 /* unzip.c */; }; 6FDEF7FC21863B6100D8FBF6 /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 6FDEF7F721863B6100D8FBF6 /* zip.c */; }; @@ -186,12 +158,6 @@ 6FF3527321C2616C0008484E /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FF3526E21C23FA10008484E /* Logger.swift */; }; 6FF4AC1F211EC472002C96EB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6FF4AC1E211EC472002C96EB /* Assets.xcassets */; }; 6FF4AC22211EC472002C96EB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6FF4AC20211EC472002C96EB /* LaunchScreen.storyboard */; }; - 6FFA5D8921942F320001E2F7 /* PacketTunnelSettingsGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F5D0C472183C6A3000F85AD /* PacketTunnelSettingsGenerator.swift */; }; - 6FFA5D8E2194370D0001E2F7 /* TunnelConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774E72172020C006A79B3 /* TunnelConfiguration.swift */; }; - 6FFA5D8F2194370D0001E2F7 /* IPAddressRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7774E9217229DB006A79B3 /* IPAddressRange.swift */; }; - 6FFA5D902194370D0001E2F7 /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F693A552179E556008551C1 /* Endpoint.swift */; }; - 6FFA5D912194370D0001E2F7 /* DNSServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F628C3E217F3413003482A3 /* DNSServer.swift */; }; - 6FFA5D9321943BC90001E2F7 /* DNSResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F5D0C1421832391000F85AD /* DNSResolver.swift */; }; 6FFA5D952194454A0001E2F7 /* NETunnelProviderProtocol+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FFA5D942194454A0001E2F7 /* NETunnelProviderProtocol+Extension.swift */; }; 6FFA5D96219446380001E2F7 /* NETunnelProviderProtocol+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FFA5D942194454A0001E2F7 /* NETunnelProviderProtocol+Extension.swift */; }; 6FFA5DA021958ECC0001E2F7 /* ErrorNotifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FFA5D9F21958ECC0001E2F7 /* ErrorNotifier.swift */; }; @@ -200,6 +166,13 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 5892BFC525593F0C000E678D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6FF4AC0C211EC46F002C96EB /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6FDAA03421CE69D000FA6925; + remoteInfo = WireGuardGoBridgemacOS; + }; 6F5D0C20218352EF000F85AD /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 6FF4AC0C211EC46F002C96EB /* Project object */; @@ -274,6 +247,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 5892BF9F25558288000E678D /* PacketTunnelProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PacketTunnelProvider.swift; sourceTree = ""; }; 5F45417C21C1B23600994C13 /* UITableViewCell+Reuse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITableViewCell+Reuse.swift"; sourceTree = ""; }; 5F45418B21C2D48200994C13 /* TunnelEditKeyValueCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelEditKeyValueCell.swift; sourceTree = ""; }; 5F45418F21C2D53800994C13 /* SwitchCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwitchCell.swift; sourceTree = ""; }; @@ -290,48 +264,38 @@ 5F52D0C021E378C000283CEA /* highlighter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = highlighter.h; sourceTree = ""; }; 5F52D0C121E378C000283CEA /* highlighter.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = highlighter.c; sourceTree = ""; }; 5F9696AF21CD7128008063FE /* TunnelConfiguration+WgQuickConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TunnelConfiguration+WgQuickConfig.swift"; sourceTree = ""; }; - 5FF7B96121CC95DE00A7DD74 /* InterfaceConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceConfiguration.swift; sourceTree = ""; }; - 5FF7B96421CC95FA00A7DD74 /* PeerConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PeerConfiguration.swift; sourceTree = ""; }; - 6B586C52220CBA6D00427C51 /* Data+KeyEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Data+KeyEncoding.swift"; sourceTree = ""; }; 6B5C5E26220A48D30024272E /* Keychain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Keychain.swift; sourceTree = ""; }; 6B62E45E220A6FA900EF34A6 /* PrivateDataConfirmation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrivateDataConfirmation.swift; sourceTree = ""; }; 6B6956352211DA80001B618A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 6B707D8321F918D4000A8F73 /* TunnelConfiguration+UapiConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TunnelConfiguration+UapiConfig.swift"; sourceTree = ""; }; - 6BD5C979220D1AE100784E08 /* key.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = key.c; sourceTree = ""; }; - 6BD5C97A220D1AE200784E08 /* key.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = key.h; sourceTree = ""; }; 6F0F44C8222D55BB00B0FF04 /* TextCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextCell.swift; sourceTree = ""; }; 6F0F44CA222D55FD00B0FF04 /* EditableTextCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditableTextCell.swift; sourceTree = ""; }; 6F1075632258AE9800D78929 /* DeleteTunnelsConfirmationAlert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeleteTunnelsConfirmationAlert.swift; sourceTree = ""; }; 6F16F46F243DB55600AA141B /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = WireGuard/ja.lproj/Localizable.strings; sourceTree = ""; }; 6F19D30322402B8700A126F2 /* ConfirmationAlertPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfirmationAlertPresenter.swift; sourceTree = ""; }; 6F2449E7226587B80047B9E9 /* MacAppStoreUpdateDetector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MacAppStoreUpdateDetector.swift; sourceTree = ""; }; - 6F3E02E8228000F6001FE7E3 /* MainMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainMenu.swift; sourceTree = ""; }; 6F29A9422278518D00DC6A6B /* RecentTunnelsTracker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecentTunnelsTracker.swift; sourceTree = ""; }; 6F29A94622787B1600DC6A6B /* QuickActionItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QuickActionItem.swift; sourceTree = ""; }; + 6F3E02E8228000F6001FE7E3 /* MainMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainMenu.swift; sourceTree = ""; }; 6F4DD16721DA552B00690EAE /* NSTableView+Reuse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSTableView+Reuse.swift"; sourceTree = ""; }; 6F4DD16A21DA558800690EAE /* TunnelListRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelListRow.swift; sourceTree = ""; }; 6F4DD16D21DBEA0700690EAE /* ManageTunnelsRootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ManageTunnelsRootViewController.swift; sourceTree = ""; }; 6F5A2B4421AFDE020081EDD8 /* FileManager+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FileManager+Extension.swift"; sourceTree = ""; }; - 6F5D0C1421832391000F85AD /* DNSResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DNSResolver.swift; sourceTree = ""; }; 6F5D0C1A218352EF000F85AD /* WireGuardNetworkExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = WireGuardNetworkExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - 6F5D0C1C218352EF000F85AD /* PacketTunnelProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PacketTunnelProvider.swift; sourceTree = ""; }; 6F5D0C1E218352EF000F85AD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 6F5D0C1F218352EF000F85AD /* WireGuardNetworkExtension_iOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = WireGuardNetworkExtension_iOS.entitlements; sourceTree = ""; }; 6F5D0C3421839E37000F85AD /* WireGuardNetworkExtension-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WireGuardNetworkExtension-Bridging-Header.h"; sourceTree = ""; }; - 6F5D0C472183C6A3000F85AD /* PacketTunnelSettingsGenerator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PacketTunnelSettingsGenerator.swift; sourceTree = ""; }; 6F5EA59A223E58A8002B380A /* ButtonRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonRow.swift; sourceTree = ""; }; 6F613D9A21DE33B8004B217A /* KeyValueRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyValueRow.swift; sourceTree = ""; }; 6F61F1E821B932F700483816 /* WireGuardAppError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WireGuardAppError.swift; sourceTree = ""; }; 6F61F1EA21B937EF00483816 /* WireGuardResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WireGuardResult.swift; sourceTree = ""; }; 6F628C3C217F09E9003482A3 /* TunnelViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelViewModel.swift; sourceTree = ""; }; - 6F628C3E217F3413003482A3 /* DNSServer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DNSServer.swift; sourceTree = ""; }; 6F628C40217F47DB003482A3 /* TunnelDetailTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TunnelDetailTableViewController.swift; sourceTree = ""; }; 6F6483E6229293300075BA15 /* LaunchedAtLoginDetector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchedAtLoginDetector.swift; sourceTree = ""; }; 6F689999218043390012E523 /* WireGuard-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WireGuard-Bridging-Header.h"; sourceTree = ""; }; 6F6899A42180447E0012E523 /* x25519.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = x25519.h; sourceTree = ""; }; 6F6899A52180447E0012E523 /* x25519.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = x25519.c; sourceTree = ""; }; 6F6899A7218044FC0012E523 /* Curve25519.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Curve25519.swift; sourceTree = ""; }; - 6F693A552179E556008551C1 /* Endpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Endpoint.swift; sourceTree = ""; }; 6F70E20D221058DF008BDFB4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = WireGuard/Base.lproj/InfoPlist.strings; sourceTree = ""; }; 6F70E22922106A2D008BDFB4 /* WireGuardLoginItemHelper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WireGuardLoginItemHelper.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6F70E23222106A31008BDFB4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -339,8 +303,6 @@ 6F7774DF217181B1006A79B3 /* MainViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; 6F7774E0217181B1006A79B3 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 6F7774E321718281006A79B3 /* TunnelsListTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TunnelsListTableViewController.swift; sourceTree = ""; }; - 6F7774E72172020C006A79B3 /* TunnelConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelConfiguration.swift; sourceTree = ""; }; - 6F7774E9217229DB006A79B3 /* IPAddressRange.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IPAddressRange.swift; sourceTree = ""; }; 6F7774EE21722D97006A79B3 /* TunnelsManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelsManager.swift; sourceTree = ""; }; 6F7774F221774263006A79B3 /* TunnelEditTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelEditTableViewController.swift; sourceTree = ""; }; 6F7F7E5E21C7D74B00527607 /* TunnelErrors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelErrors.swift; sourceTree = ""; }; @@ -368,7 +330,6 @@ 6FB1BD6721D2607E00A991BF /* WireGuard.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = WireGuard.entitlements; sourceTree = ""; }; 6FB1BD9121D4BFE600A991BF /* WireGuardNetworkExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = WireGuardNetworkExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 6FB1BD9621D4BFE700A991BF /* WireGuardNetworkExtension_macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = WireGuardNetworkExtension_macOS.entitlements; sourceTree = ""; }; - 6FB1BDA021D4E00A00A991BF /* libwg-go.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libwg-go.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 6FB1BDB621D4F8B800A991BF /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/NetworkExtension.framework; sourceTree = DEVELOPER_DIR; }; 6FBA101321D613F30051C35F /* Application.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Application.swift; sourceTree = ""; }; 6FBA101621D655340051C35F /* StatusMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusMenu.swift; sourceTree = ""; }; @@ -383,7 +344,6 @@ 6FDB6D12224A15BE00EE4BC3 /* LogViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; 6FDB6D14224CB2CE00EE4BC3 /* LogViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewCell.swift; sourceTree = ""; }; 6FDB6D16224CC04E00EE4BC3 /* LogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; - 6FDEF7E321846C1A00D8FBF6 /* libwg-go.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libwg-go.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 6FDEF7E52185EFAF00D8FBF6 /* QRScanViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QRScanViewController.swift; sourceTree = ""; }; 6FDEF7F621863B6100D8FBF6 /* unzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unzip.c; sourceTree = ""; }; 6FDEF7F721863B6100D8FBF6 /* zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zip.c; sourceTree = ""; }; @@ -419,8 +379,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 5892BFF325594742000E678D /* WireGuardKit in Frameworks */, 6B5CA6B1220DE4E900F126CF /* NetworkExtension.framework in Frameworks */, - 6FDEF7E421846C1A00D8FBF6 /* libwg-go.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -428,6 +388,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 5892BFDD25593F80000E678D /* WireGuardKit in Frameworks */, 6FB1BDDA21D5170800A991BF /* NetworkExtension.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -436,8 +397,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 5892BFDB25593F79000E678D /* WireGuardKit in Frameworks */, 6B5CA6B2220DE4F400F126CF /* NetworkExtension.framework in Frameworks */, - 6FB1BDA121D4E00A00A991BF /* libwg-go.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -445,6 +406,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 5892BF8F255581F6000E678D /* WireGuardKit in Frameworks */, 6B653B86220DE2960050E69C /* NetworkExtension.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -506,14 +468,12 @@ 6F5D0C1B218352EF000F85AD /* WireGuardNetworkExtension */ = { isa = PBXGroup; children = ( - 6F5D0C1C218352EF000F85AD /* PacketTunnelProvider.swift */, - 6F5D0C472183C6A3000F85AD /* PacketTunnelSettingsGenerator.swift */, - 6F5D0C1421832391000F85AD /* DNSResolver.swift */, 6F5D0C1E218352EF000F85AD /* Info.plist */, 6F5D0C1F218352EF000F85AD /* WireGuardNetworkExtension_iOS.entitlements */, 6FB1BD9621D4BFE700A991BF /* WireGuardNetworkExtension_macOS.entitlements */, 6F5D0C3421839E37000F85AD /* WireGuardNetworkExtension-Bridging-Header.h */, 6FFA5D9F21958ECC0001E2F7 /* ErrorNotifier.swift */, + 5892BF9F25558288000E678D /* PacketTunnelProvider.swift */, ); path = WireGuardNetworkExtension; sourceTree = ""; @@ -586,18 +546,9 @@ 6F7774E6217201E0006A79B3 /* Model */ = { isa = PBXGroup; children = ( - 6BD5C979220D1AE100784E08 /* key.c */, - 6BD5C97A220D1AE200784E08 /* key.h */, 5F9696AF21CD7128008063FE /* TunnelConfiguration+WgQuickConfig.swift */, 6FFA5D942194454A0001E2F7 /* NETunnelProviderProtocol+Extension.swift */, 5F4541B121CBFAEE00994C13 /* String+ArrayConversion.swift */, - 6F7774E72172020C006A79B3 /* TunnelConfiguration.swift */, - 6F7774E9217229DB006A79B3 /* IPAddressRange.swift */, - 6F693A552179E556008551C1 /* Endpoint.swift */, - 6F628C3E217F3413003482A3 /* DNSServer.swift */, - 5FF7B96121CC95DE00A7DD74 /* InterfaceConfiguration.swift */, - 5FF7B96421CC95FA00A7DD74 /* PeerConfiguration.swift */, - 6B586C52220CBA6D00427C51 /* Data+KeyEncoding.swift */, ); path = Model; sourceTree = ""; @@ -762,8 +713,6 @@ isa = PBXGroup; children = ( 6FB1BDB621D4F8B800A991BF /* NetworkExtension.framework */, - 6FDEF7E321846C1A00D8FBF6 /* libwg-go.a */, - 6FB1BDA021D4E00A00A991BF /* libwg-go.a */, 6FF4AC462120B9E0002C96EB /* NetworkExtension.framework */, ); name = Frameworks; @@ -779,7 +728,7 @@ buildPhases = ( ); buildToolPath = /usr/bin/make; - buildWorkingDirectory = "$(PROJECT_DIR)/../wireguard-go-bridge"; + buildWorkingDirectory = "$BUILD_DIR/../../SourcePackages/checkouts/wireguard-apple/wireguard-go-bridge"; dependencies = ( ); name = WireGuardGoBridgemacOS; @@ -793,7 +742,7 @@ buildPhases = ( ); buildToolPath = /usr/bin/make; - buildWorkingDirectory = "$(PROJECT_DIR)/../wireguard-go-bridge"; + buildWorkingDirectory = "$BUILD_DIR/../../SourcePackages/checkouts/wireguard-apple/wireguard-go-bridge"; dependencies = ( ); name = WireGuardGoBridgeiOS; @@ -808,7 +757,6 @@ buildConfigurationList = 6F5D0C25218352EF000F85AD /* Build configuration list for PBXNativeTarget "WireGuardNetworkExtensioniOS" */; buildPhases = ( 5F45417B21C0906F00994C13 /* Swiftlint */, - 6F61F1EC21BA4D4700483816 /* Extract wireguard-go Version */, 6F5D0C16218352EF000F85AD /* Sources */, 6F5D0C17218352EF000F85AD /* Frameworks */, 6F5D0C18218352EF000F85AD /* Resources */, @@ -819,6 +767,9 @@ 6FDEF7E221846C0000D8FBF6 /* PBXTargetDependency */, ); name = WireGuardNetworkExtensioniOS; + packageProductDependencies = ( + 5892BFF225594742000E678D /* WireGuardKit */, + ); productName = WireGuardNetworkExtension; productReference = 6F5D0C1A218352EF000F85AD /* WireGuardNetworkExtension.appex */; productType = "com.apple.product-type.app-extension"; @@ -854,10 +805,14 @@ buildRules = ( ); dependencies = ( + 5892BFC625593F0C000E678D /* PBXTargetDependency */, 6F70E23B22109DD3008BDFB4 /* PBXTargetDependency */, 6FB1BD9821D4BFE700A991BF /* PBXTargetDependency */, ); name = WireGuardmacOS; + packageProductDependencies = ( + 5892BFDC25593F80000E678D /* WireGuardKit */, + ); productName = WireGuardmacOS; productReference = 6FB1BD5D21D2607A00A991BF /* WireGuard.app */; productType = "com.apple.product-type.application"; @@ -867,7 +822,6 @@ buildConfigurationList = 6FB1BD9C21D4BFE700A991BF /* Build configuration list for PBXNativeTarget "WireGuardNetworkExtensionmacOS" */; buildPhases = ( 6FB1BDB421D4F5CF00A991BF /* Swiftlint */, - 6FB1BDB521D4F61C00A991BF /* Extract wireguard-go Version */, 6FB1BD8D21D4BFE600A991BF /* Sources */, 6FB1BD8E21D4BFE600A991BF /* Frameworks */, 6FB1BD8F21D4BFE600A991BF /* Resources */, @@ -878,6 +832,9 @@ 6FB1BD9F21D4DF7A00A991BF /* PBXTargetDependency */, ); name = WireGuardNetworkExtensionmacOS; + packageProductDependencies = ( + 5892BFDA25593F79000E678D /* WireGuardKit */, + ); productName = WireGuardNetworkExtension; productReference = 6FB1BD9121D4BFE600A991BF /* WireGuardNetworkExtension.appex */; productType = "com.apple.product-type.app-extension"; @@ -900,6 +857,9 @@ 6F5D0C21218352EF000F85AD /* PBXTargetDependency */, ); name = WireGuardiOS; + packageProductDependencies = ( + 5892BF8E255581F6000E678D /* WireGuardKit */, + ); productName = WireGuard; productReference = 6FF4AC14211EC46F002C96EB /* WireGuard.app */; productType = "com.apple.product-type.application"; @@ -982,6 +942,9 @@ de, ); mainGroup = 6FF4AC0B211EC46F002C96EB; + packageReferences = ( + 5892BF8D255581F6000E678D /* XCRemoteSwiftPackageReference "wireguard-apple" */, + ); productRefGroup = 6FF4AC15211EC46F002C96EB /* Products */; projectDirPath = ""; projectRoot = ""; @@ -1112,25 +1075,6 @@ shellScript = "exec make -C \"$PROJECT_DIR/../wireguard-go-bridge\" version-header\n"; showEnvVarsInLog = 0; }; - 6F61F1EC21BA4D4700483816 /* Extract wireguard-go Version */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "Extract wireguard-go Version"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "exec make -C \"$PROJECT_DIR/../wireguard-go-bridge\" version-header\n"; - showEnvVarsInLog = 0; - }; 6FB1BDB421D4F5CF00A991BF /* Swiftlint */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1149,25 +1093,6 @@ shellPath = /bin/sh; shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; }; - 6FB1BDB521D4F61C00A991BF /* Extract wireguard-go Version */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "Extract wireguard-go Version"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "exec make -C \"$PROJECT_DIR/../wireguard-go-bridge\" version-header\n"; - showEnvVarsInLog = 0; - }; 6FB1BDB821D4FA9100A991BF /* Strip Trailing Whitespace */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1237,18 +1162,8 @@ 5F9696B121CD7128008063FE /* TunnelConfiguration+WgQuickConfig.swift in Sources */, 6B5C5E28220A48D30024272E /* Keychain.swift in Sources */, 6FFA5D96219446380001E2F7 /* NETunnelProviderProtocol+Extension.swift in Sources */, - 6FFA5D8E2194370D0001E2F7 /* TunnelConfiguration.swift in Sources */, - 5FF7B96621CC95FA00A7DD74 /* PeerConfiguration.swift in Sources */, 5F9696AE21CD6F72008063FE /* String+ArrayConversion.swift in Sources */, - 6FFA5D8F2194370D0001E2F7 /* IPAddressRange.swift in Sources */, - 6B586C54220CBA6D00427C51 /* Data+KeyEncoding.swift in Sources */, - 6FFA5D902194370D0001E2F7 /* Endpoint.swift in Sources */, - 5FF7B96321CC95DE00A7DD74 /* InterfaceConfiguration.swift in Sources */, - 6FFA5D9321943BC90001E2F7 /* DNSResolver.swift in Sources */, - 6BD5C97C220D1AE200784E08 /* key.c in Sources */, - 6FFA5D912194370D0001E2F7 /* DNSServer.swift in Sources */, - 6FFA5D8921942F320001E2F7 /* PacketTunnelSettingsGenerator.swift in Sources */, - 6F5D0C1D218352EF000F85AD /* PacketTunnelProvider.swift in Sources */, + 5892BFA025558288000E678D /* PacketTunnelProvider.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1284,7 +1199,6 @@ 6FDB3C3B21DCF47400A0C0BF /* TunnelDetailTableViewController.swift in Sources */, 6FB1BDD721D50F5300A991BF /* WireGuardAppError.swift in Sources */, 5F52D0BD21E3785C00283CEA /* ConfTextStorage.swift in Sources */, - 6BD5C97D220D1AE200784E08 /* key.c in Sources */, 5F52D0C221E378C000283CEA /* highlighter.c in Sources */, 6F4DD16E21DBEA0700690EAE /* ManageTunnelsRootViewController.swift in Sources */, 6F4DD16C21DA558F00690EAE /* NSTableView+Reuse.swift in Sources */, @@ -1296,7 +1210,6 @@ 6FCD99B121E0EDA900BA4C82 /* TunnelEditViewController.swift in Sources */, 6FB1BDCA21D50F1700A991BF /* x25519.c in Sources */, 6FB1BDCB21D50F1700A991BF /* Curve25519.swift in Sources */, - 6B586C55220CBA6D00427C51 /* Data+KeyEncoding.swift in Sources */, 6FB17946222FD5960018AE71 /* OnDemandWiFiControls.swift in Sources */, 6FB1BDBB21D50F0200A991BF /* Localizable.strings in Sources */, 6FB1BDBC21D50F0200A991BF /* ringlogger.c in Sources */, @@ -1322,15 +1235,9 @@ 5F52D0BB21E3781B00283CEA /* ConfTextView.swift in Sources */, 6FBA104021D6B7040051C35F /* ErrorPresenterProtocol.swift in Sources */, 6FCD99AA21E0E14700BA4C82 /* ButtonedDetailViewController.swift in Sources */, - 6FB1BDC321D50F0300A991BF /* TunnelConfiguration.swift in Sources */, - 6FB1BDC421D50F0300A991BF /* IPAddressRange.swift in Sources */, 6FBA104321D6BC250051C35F /* ErrorPresenter.swift in Sources */, - 6FB1BDC521D50F0300A991BF /* Endpoint.swift in Sources */, - 6FB1BDC621D50F0300A991BF /* DNSServer.swift in Sources */, 6F2449E8226587B90047B9E9 /* MacAppStoreUpdateDetector.swift in Sources */, - 6FB1BDC721D50F0300A991BF /* InterfaceConfiguration.swift in Sources */, 6F907C9D224663A2003CED21 /* LogViewHelper.swift in Sources */, - 6FB1BDC821D50F0300A991BF /* PeerConfiguration.swift in Sources */, 6FB1BDC921D50F0300A991BF /* FileManager+Extension.swift in Sources */, 6FB1BD6021D2607A00A991BF /* AppDelegate.swift in Sources */, ); @@ -1340,9 +1247,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6FB1BDB021D4F55700A991BF /* PacketTunnelProvider.swift in Sources */, - 6FB1BDB121D4F55700A991BF /* PacketTunnelSettingsGenerator.swift in Sources */, - 6FB1BDB221D4F55700A991BF /* DNSResolver.swift in Sources */, 6FB1BDB321D4F55700A991BF /* ErrorNotifier.swift in Sources */, 6FB1BDA221D4F53300A991BF /* ringlogger.c in Sources */, 6B5C5E2A220A48D30024272E /* Keychain.swift in Sources */, @@ -1350,14 +1254,7 @@ 6FB1BDA521D4F53300A991BF /* TunnelConfiguration+WgQuickConfig.swift in Sources */, 6FB1BDA621D4F53300A991BF /* NETunnelProviderProtocol+Extension.swift in Sources */, 6FB1BDA721D4F53300A991BF /* String+ArrayConversion.swift in Sources */, - 6FB1BDA921D4F53300A991BF /* TunnelConfiguration.swift in Sources */, - 6B586C56220CBA6D00427C51 /* Data+KeyEncoding.swift in Sources */, - 6FB1BDAA21D4F53300A991BF /* IPAddressRange.swift in Sources */, - 6FB1BDAB21D4F53300A991BF /* Endpoint.swift in Sources */, - 6FB1BDAC21D4F53300A991BF /* DNSServer.swift in Sources */, - 6BD5C97E220D1AE200784E08 /* key.c in Sources */, - 6FB1BDAD21D4F53300A991BF /* InterfaceConfiguration.swift in Sources */, - 6FB1BDAE21D4F53300A991BF /* PeerConfiguration.swift in Sources */, + 5892BFA125558288000E678D /* PacketTunnelProvider.swift in Sources */, 6FB1BDAF21D4F53300A991BF /* FileManager+Extension.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1378,12 +1275,9 @@ 6FE254FF219C60290028284D /* ZipExporter.swift in Sources */, 6F8F0D7122258153000E8335 /* ActivateOnDemandViewModel.swift in Sources */, 6F8F0D7722267C57000E8335 /* SSIDOptionEditTableViewController.swift in Sources */, - 6B586C53220CBA6D00427C51 /* Data+KeyEncoding.swift in Sources */, - 6F693A562179E556008551C1 /* Endpoint.swift in Sources */, 6FDEF7E62185EFB200D8FBF6 /* QRScanViewController.swift in Sources */, 6FDB6D18224CC05A00EE4BC3 /* LogViewController.swift in Sources */, 6FFA5D952194454A0001E2F7 /* NETunnelProviderProtocol+Extension.swift in Sources */, - 5FF7B96221CC95DE00A7DD74 /* InterfaceConfiguration.swift in Sources */, 5F4541A921C451D100994C13 /* TunnelStatus.swift in Sources */, 6F8F0D7422267AD2000E8335 /* ChevronCell.swift in Sources */, 6F61F1E921B932F700483816 /* WireGuardAppError.swift in Sources */, @@ -1393,7 +1287,6 @@ 6F7F7E5F21C7D74B00527607 /* TunnelErrors.swift in Sources */, 6FDEF7FC21863B6100D8FBF6 /* zip.c in Sources */, 6B5C5E27220A48D30024272E /* Keychain.swift in Sources */, - 6F628C3F217F3413003482A3 /* DNSServer.swift in Sources */, 6F628C3D217F09E9003482A3 /* TunnelViewModel.swift in Sources */, 5F4541A621C4449E00994C13 /* ButtonCell.swift in Sources */, 5F45419821C2D60500994C13 /* KeyValueCell.swift in Sources */, @@ -1405,8 +1298,6 @@ 6F5A2B4821AFF49A0081EDD8 /* FileManager+Extension.swift in Sources */, 5F45418C21C2D48200994C13 /* TunnelEditKeyValueCell.swift in Sources */, 6FE254FB219C10800028284D /* ZipImporter.swift in Sources */, - 6F7774EA217229DB006A79B3 /* IPAddressRange.swift in Sources */, - 6F7774E82172020C006A79B3 /* TunnelConfiguration.swift in Sources */, 6FDEF7FB21863B6100D8FBF6 /* unzip.c in Sources */, 6F29A9432278518D00DC6A6B /* RecentTunnelsTracker.swift in Sources */, 6F6899A8218044FC0012E523 /* Curve25519.swift in Sources */, @@ -1419,12 +1310,10 @@ 6FBA103B21D6B4290051C35F /* ErrorPresenterProtocol.swift in Sources */, 6FDEF802218646BA00D8FBF6 /* ZipArchive.swift in Sources */, 5F45419021C2D53800994C13 /* SwitchCell.swift in Sources */, - 6BD5C97B220D1AE200784E08 /* key.c in Sources */, 6FB1017921C57DE600766195 /* MockTunnels.swift in Sources */, 6B707D8421F918D4000A8F73 /* TunnelConfiguration+UapiConfig.swift in Sources */, 6FDEF806218725D200D8FBF6 /* SettingsTableViewController.swift in Sources */, 5F4541A221C2D6DF00994C13 /* BorderedTextButton.swift in Sources */, - 5FF7B96521CC95FA00A7DD74 /* PeerConfiguration.swift in Sources */, 6F7774E1217181B1006A79B3 /* MainViewController.swift in Sources */, 6FFA5DA42197085D0001E2F7 /* ActivateOnDemandOption.swift in Sources */, 5F4541B221CBFAEE00994C13 /* String+ArrayConversion.swift in Sources */, @@ -1435,6 +1324,11 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 5892BFC625593F0C000E678D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6FDAA03421CE69D000FA6925 /* WireGuardGoBridgemacOS */; + targetProxy = 5892BFC525593F0C000E678D /* PBXContainerItemProxy */; + }; 6F5D0C21218352EF000F85AD /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 6F5D0C19218352EF000F85AD /* WireGuardNetworkExtensioniOS */; @@ -1735,6 +1629,7 @@ GCC_WARN_UNUSED_LABEL = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -1797,6 +1692,7 @@ GCC_WARN_UNUSED_LABEL = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -1919,6 +1815,40 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 5892BF8D255581F6000E678D /* XCRemoteSwiftPackageReference "wireguard-apple" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://git.zx2c4.com/wireguard-apple"; + requirement = { + branch = "am/wg-adapter-rebased"; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 5892BF8E255581F6000E678D /* WireGuardKit */ = { + isa = XCSwiftPackageProductDependency; + package = 5892BF8D255581F6000E678D /* XCRemoteSwiftPackageReference "wireguard-apple" */; + productName = WireGuardKit; + }; + 5892BFDA25593F79000E678D /* WireGuardKit */ = { + isa = XCSwiftPackageProductDependency; + package = 5892BF8D255581F6000E678D /* XCRemoteSwiftPackageReference "wireguard-apple" */; + productName = WireGuardKit; + }; + 5892BFDC25593F80000E678D /* WireGuardKit */ = { + isa = XCSwiftPackageProductDependency; + package = 5892BF8D255581F6000E678D /* XCRemoteSwiftPackageReference "wireguard-apple" */; + productName = WireGuardKit; + }; + 5892BFF225594742000E678D /* WireGuardKit */ = { + isa = XCSwiftPackageProductDependency; + package = 5892BF8D255581F6000E678D /* XCRemoteSwiftPackageReference "wireguard-apple" */; + productName = WireGuardKit; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 6FF4AC0C211EC46F002C96EB /* Project object */; } diff --git a/WireGuard/WireGuard.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/WireGuard/WireGuard.xcodeproj/project.xcworkspace/contents.xcworkspacedata index adb47a3..919434a 100644 --- a/WireGuard/WireGuard.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/WireGuard/WireGuard.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/WireGuard/WireGuard.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/WireGuard/WireGuard.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..92e14ab --- /dev/null +++ b/WireGuard/WireGuard.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,16 @@ +{ + "object": { + "pins": [ + { + "package": "WireGuardKit", + "repositoryURL": "https://git.zx2c4.com/wireguard-apple", + "state": { + "branch": "am/wg-adapter-rebased", + "revision": "ca605363c05cda61fbd21e031f3fb5eee7f259c8", + "version": null + } + } + ] + }, + "version": 1 +} diff --git a/WireGuard/WireGuard/Crypto/Curve25519.swift b/WireGuard/WireGuard/Crypto/Curve25519.swift index 602cd2d..07341ef 100644 --- a/WireGuard/WireGuard/Crypto/Curve25519.swift +++ b/WireGuard/WireGuard/Crypto/Curve25519.swift @@ -2,6 +2,7 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import Foundation +import WireGuardKit struct Curve25519 { diff --git a/WireGuard/WireGuard/Tunnel/MockTunnels.swift b/WireGuard/WireGuard/Tunnel/MockTunnels.swift index b987799..f04e929 100644 --- a/WireGuard/WireGuard/Tunnel/MockTunnels.swift +++ b/WireGuard/WireGuard/Tunnel/MockTunnels.swift @@ -2,6 +2,7 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import NetworkExtension +import WireGuardKit // Creates mock tunnels for the iOS Simulator. diff --git a/WireGuard/WireGuard/Tunnel/TunnelConfiguration+UapiConfig.swift b/WireGuard/WireGuard/Tunnel/TunnelConfiguration+UapiConfig.swift index 38f1e6f..18e478e 100644 --- a/WireGuard/WireGuard/Tunnel/TunnelConfiguration+UapiConfig.swift +++ b/WireGuard/WireGuard/Tunnel/TunnelConfiguration+UapiConfig.swift @@ -2,6 +2,7 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import Foundation +import WireGuardKit extension TunnelConfiguration { convenience init(fromUapiConfig uapiConfig: String, basedOn base: TunnelConfiguration? = nil) throws { diff --git a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift index ba14a3b..af6a9bb 100644 --- a/WireGuard/WireGuard/Tunnel/TunnelsManager.swift +++ b/WireGuard/WireGuard/Tunnel/TunnelsManager.swift @@ -4,6 +4,7 @@ import Foundation import NetworkExtension import os.log +import WireGuardKit protocol TunnelsManagerListDelegate: class { func tunnelAdded(at index: Int) diff --git a/WireGuard/WireGuard/UI/TunnelImporter.swift b/WireGuard/WireGuard/UI/TunnelImporter.swift index 46f2c92..3846382 100644 --- a/WireGuard/WireGuard/UI/TunnelImporter.swift +++ b/WireGuard/WireGuard/UI/TunnelImporter.swift @@ -2,6 +2,7 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import Foundation +import WireGuardKit class TunnelImporter { static func importFromFile(urls: [URL], into tunnelsManager: TunnelsManager, sourceVC: AnyObject?, errorPresenterType: ErrorPresenterProtocol.Type, completionHandler: (() -> Void)? = nil) { diff --git a/WireGuard/WireGuard/UI/TunnelViewModel.swift b/WireGuard/WireGuard/UI/TunnelViewModel.swift index 217de48..eafe79d 100644 --- a/WireGuard/WireGuard/UI/TunnelViewModel.swift +++ b/WireGuard/WireGuard/UI/TunnelViewModel.swift @@ -2,6 +2,7 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import Foundation +import WireGuardKit class TunnelViewModel { diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/QRScanViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/QRScanViewController.swift index 9d04dfa..041421f 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/QRScanViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/QRScanViewController.swift @@ -3,6 +3,7 @@ import AVFoundation import UIKit +import WireGuardKit protocol QRScanViewControllerDelegate: class { func addScannedQRCode(tunnelConfiguration: TunnelConfiguration, qrScanViewController: QRScanViewController, completionHandler: (() -> Void)?) diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/SettingsTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/SettingsTableViewController.swift index 7f812d5..d2c6f0c 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/SettingsTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/SettingsTableViewController.swift @@ -3,6 +3,7 @@ import UIKit import os.log +import WireGuardKit class SettingsTableViewController: UITableViewController { @@ -152,7 +153,7 @@ extension SettingsTableViewController { } cell.value = appVersion } else if field == .goBackendVersion { - cell.value = WIREGUARD_GO_VERSION + cell.value = getWireGuardVersion() } return cell } else if field == .exportZipArchive { diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift index ea432da..d49acbc 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelDetailTableViewController.swift @@ -2,6 +2,7 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import UIKit +import WireGuardKit class TunnelDetailTableViewController: UITableViewController { diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift index e805db5..f442420 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift @@ -4,6 +4,7 @@ import UIKit import MobileCoreServices import UserNotifications +import WireGuardKit class TunnelsListTableViewController: UIViewController { diff --git a/WireGuard/WireGuard/UI/macOS/AppDelegate.swift b/WireGuard/WireGuard/UI/macOS/AppDelegate.swift index cb24023..39a9469 100644 --- a/WireGuard/WireGuard/UI/macOS/AppDelegate.swift +++ b/WireGuard/WireGuard/UI/macOS/AppDelegate.swift @@ -3,6 +3,7 @@ import Cocoa import ServiceManagement +import WireGuardKit @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { @@ -208,7 +209,7 @@ extension AppDelegate { } let appVersionString = [ tr(format: "macAppVersion (%@)", appVersion), - tr(format: "macGoBackendVersion (%@)", WIREGUARD_GO_VERSION) + tr(format: "macGoBackendVersion (%@)", getWireGuardVersion()) ].joined(separator: "\n") let donateString = NSMutableAttributedString(string: tr("donateLink")) donateString.addAttribute(.link, value: "https://www.wireguard.com/donations/", range: NSRange(location: 0, length: donateString.length)) diff --git a/WireGuard/WireGuard/UI/macOS/ParseError+WireGuardAppError.swift b/WireGuard/WireGuard/UI/macOS/ParseError+WireGuardAppError.swift index 6afbadb..8622510 100644 --- a/WireGuard/WireGuard/UI/macOS/ParseError+WireGuardAppError.swift +++ b/WireGuard/WireGuard/UI/macOS/ParseError+WireGuardAppError.swift @@ -2,6 +2,7 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import Cocoa +import WireGuardKit // We have this in a separate file because we don't want the network extension // code to see WireGuardAppError and tr(). Also, this extension is used only on macOS. diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift index 5ce3dc7..80b759e 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift @@ -2,6 +2,7 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import Cocoa +import WireGuardKit class TunnelDetailTableViewController: NSViewController { diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift index 17ebbef..de2423e 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift @@ -2,6 +2,7 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import Cocoa +import WireGuardKit protocol TunnelEditViewControllerDelegate: class { func tunnelSaved(tunnel: TunnelContainer) diff --git a/WireGuard/WireGuard/WireGuard-Bridging-Header.h b/WireGuard/WireGuard/WireGuard-Bridging-Header.h index 81766ab..1cd98ee 100644 --- a/WireGuard/WireGuard/WireGuard-Bridging-Header.h +++ b/WireGuard/WireGuard/WireGuard-Bridging-Header.h @@ -1,10 +1,8 @@ #include "x25519.h" #include "unzip.h" #include "zip.h" -#include "wireguard-go-version.h" #include "ringlogger.h" #include "highlighter.h" -#include "key.h" #import "TargetConditionals.h" #if TARGET_OS_OSX diff --git a/WireGuard/WireGuard/ZipArchive/ZipExporter.swift b/WireGuard/WireGuard/ZipArchive/ZipExporter.swift index 3a87928..fe3d984 100644 --- a/WireGuard/WireGuard/ZipArchive/ZipExporter.swift +++ b/WireGuard/WireGuard/ZipArchive/ZipExporter.swift @@ -2,6 +2,7 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import Foundation +import WireGuardKit enum ZipExporterError: WireGuardAppError { case noTunnelsToExport diff --git a/WireGuard/WireGuard/ZipArchive/ZipImporter.swift b/WireGuard/WireGuard/ZipArchive/ZipImporter.swift index 499181a..c988e94 100644 --- a/WireGuard/WireGuard/ZipArchive/ZipImporter.swift +++ b/WireGuard/WireGuard/ZipArchive/ZipImporter.swift @@ -2,6 +2,7 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import Foundation +import WireGuardKit class ZipImporter { static func importConfigFiles(from url: URL, completion: @escaping (Result<[TunnelConfiguration?], ZipArchiveError>) -> Void) { diff --git a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift index 8cc07d2..15715ef 100644 --- a/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift +++ b/WireGuard/WireGuardNetworkExtension/PacketTunnelProvider.swift @@ -2,9 +2,7 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import Foundation -import Network import NetworkExtension -import os.log class PacketTunnelProvider: NEPacketTunnelProvider { diff --git a/WireGuard/WireGuardNetworkExtension/WireGuardNetworkExtension-Bridging-Header.h b/WireGuard/WireGuardNetworkExtension/WireGuardNetworkExtension-Bridging-Header.h index eae8b9d..8c27632 100644 --- a/WireGuard/WireGuardNetworkExtension/WireGuardNetworkExtension-Bridging-Header.h +++ b/WireGuard/WireGuardNetworkExtension/WireGuardNetworkExtension-Bridging-Header.h @@ -1,4 +1,2 @@ #include "../../wireguard-go-bridge/wireguard.h" -#include "wireguard-go-version.h" #include "ringlogger.h" -#include "key.h"