aboutsummaryrefslogtreecommitdiffstats
path: root/Sources/WireGuardKit
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2020-12-02 16:10:44 +0100
committerAndrej Mihajlov <and@mullvad.net>2020-12-03 13:32:25 +0100
commit547077a808171f5ce7be449ed0fc7a3c1abe634e (patch)
tree785e6396dc44d6d21844329d509273e8d1340f08 /Sources/WireGuardKit
parentRemove Sources/ in project folder names (diff)
downloadwireguard-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.swift3
-rw-r--r--Sources/WireGuardKit/PrivateKey.swift3
-rw-r--r--Sources/WireGuardKit/WireGuardAdapter.swift3
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.