diff options
author | Andrej Mihajlov <and@mullvad.net> | 2020-12-02 16:10:44 +0100 |
---|---|---|
committer | Andrej Mihajlov <and@mullvad.net> | 2020-12-03 13:32:25 +0100 |
commit | 547077a808171f5ce7be449ed0fc7a3c1abe634e (patch) | |
tree | 785e6396dc44d6d21844329d509273e8d1340f08 /Sources/WireGuardKit | |
parent | Remove Sources/ in project folder names (diff) | |
download | wireguard-apple-547077a808171f5ce7be449ed0fc7a3c1abe634e.tar.xz wireguard-apple-547077a808171f5ce7be449ed0fc7a3c1abe634e.zip |
WireGuardApp: integrate WireGuardKit sources directly
Signed-off-by: Andrej Mihajlov <and@mullvad.net>
Diffstat (limited to 'Sources/WireGuardKit')
-rw-r--r-- | Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift | 3 | ||||
-rw-r--r-- | Sources/WireGuardKit/PrivateKey.swift | 3 | ||||
-rw-r--r-- | Sources/WireGuardKit/WireGuardAdapter.swift | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift b/Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift index e4fead3..1dd1e66 100644 --- a/Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift +++ b/Sources/WireGuardKit/PacketTunnelSettingsGenerator.swift @@ -4,7 +4,10 @@ import Foundation import Network import NetworkExtension + +#if SWIFT_PACKAGE import WireGuardKitC +#endif class PacketTunnelSettingsGenerator { let tunnelConfiguration: TunnelConfiguration diff --git a/Sources/WireGuardKit/PrivateKey.swift b/Sources/WireGuardKit/PrivateKey.swift index 545cdbc..b224f19 100644 --- a/Sources/WireGuardKit/PrivateKey.swift +++ b/Sources/WireGuardKit/PrivateKey.swift @@ -2,7 +2,10 @@ // Copyright © 2018-2019 WireGuard LLC. All Rights Reserved. import Foundation + +#if SWIFT_PACKAGE import WireGuardKitC +#endif /// The class describing a private key used by WireGuard. public class PrivateKey: BaseKey { diff --git a/Sources/WireGuardKit/WireGuardAdapter.swift b/Sources/WireGuardKit/WireGuardAdapter.swift index ef644bd..2cb236f 100644 --- a/Sources/WireGuardKit/WireGuardAdapter.swift +++ b/Sources/WireGuardKit/WireGuardAdapter.swift @@ -3,7 +3,10 @@ import Foundation import NetworkExtension + +#if SWIFT_PACKAGE import WireGuardKitGo +#endif public enum WireGuardAdapterError: Error { /// Failure to locate tunnel file descriptor. |