diff options
author | 2018-12-27 17:41:54 +0530 | |
---|---|---|
committer | 2019-01-14 14:52:27 +0530 | |
commit | b32b897181302bcd8536468816891a65e061cb39 (patch) | |
tree | 998022c9b071ec73003fa650144ddc55c593b9a6 /WireGuard/WireGuardNetworkExtensionmacOS | |
parent | macOS: WireGuardNetworkExtensionmacOS depends on WireGuardGoBridgemacOS (diff) | |
download | wireguard-apple-b32b897181302bcd8536468816891a65e061cb39.tar.xz wireguard-apple-b32b897181302bcd8536468816891a65e061cb39.zip |
macOS: Fix WireGuardNetworkExtensionmacOS target
- Build using common network extension code
- Add run scripts
- Set Info.plist to common network extension's Info.plist
- Move entitlements to common network extension folder
- Remove Xcode-generated macOS network extension code
- Set Swift-Obj-C bridging header
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuardNetworkExtension/WireGuardNetworkExtension_macOS.entitlements (renamed from WireGuard/WireGuardNetworkExtensionmacOS/WireGuardNetworkExtensionmacOS.entitlements) | 0 | ||||
-rw-r--r-- | WireGuard/WireGuardNetworkExtensionmacOS/Info.plist | 35 | ||||
-rw-r--r-- | WireGuard/WireGuardNetworkExtensionmacOS/PacketTunnelProvider.swift | 32 |
3 files changed, 0 insertions, 67 deletions
diff --git a/WireGuard/WireGuardNetworkExtensionmacOS/WireGuardNetworkExtensionmacOS.entitlements b/WireGuard/WireGuardNetworkExtension/WireGuardNetworkExtension_macOS.entitlements index 3a24a44..3a24a44 100644 --- a/WireGuard/WireGuardNetworkExtensionmacOS/WireGuardNetworkExtensionmacOS.entitlements +++ b/WireGuard/WireGuardNetworkExtension/WireGuardNetworkExtension_macOS.entitlements diff --git a/WireGuard/WireGuardNetworkExtensionmacOS/Info.plist b/WireGuard/WireGuardNetworkExtensionmacOS/Info.plist deleted file mode 100644 index 05e0699..0000000 --- a/WireGuard/WireGuardNetworkExtensionmacOS/Info.plist +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>$(DEVELOPMENT_LANGUAGE)</string> - <key>CFBundleDisplayName</key> - <string>WireGuardNetworkExtensionmacOS</string> - <key>CFBundleExecutable</key> - <string>$(EXECUTABLE_NAME)</string> - <key>CFBundleIdentifier</key> - <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>$(PRODUCT_NAME)</string> - <key>CFBundlePackageType</key> - <string>XPC!</string> - <key>CFBundleShortVersionString</key> - <string>1.0</string> - <key>CFBundleVersion</key> - <string>1</string> - <key>LSMinimumSystemVersion</key> - <string>$(MACOSX_DEPLOYMENT_TARGET)</string> - <key>NSExtension</key> - <dict> - <key>NSExtensionPointIdentifier</key> - <string>com.apple.networkextension.packet-tunnel</string> - <key>NSExtensionPrincipalClass</key> - <string>$(PRODUCT_MODULE_NAME).PacketTunnelProvider</string> - </dict> - <key>NSHumanReadableCopyright</key> - <string>Copyright © 2018 WireGuard LLC. All rights reserved.</string> -</dict> -</plist> diff --git a/WireGuard/WireGuardNetworkExtensionmacOS/PacketTunnelProvider.swift b/WireGuard/WireGuardNetworkExtensionmacOS/PacketTunnelProvider.swift deleted file mode 100644 index 6d3b21a..0000000 --- a/WireGuard/WireGuardNetworkExtensionmacOS/PacketTunnelProvider.swift +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: MIT -// Copyright © 2018 WireGuard LLC. All Rights Reserved. - -import NetworkExtension - -class PacketTunnelProvider: NEPacketTunnelProvider { - - override func startTunnel(options: [String : NSObject]?, completionHandler: @escaping (Error?) -> Void) { - // Add code here to start the process of connecting the tunnel. - } - - override func stopTunnel(with reason: NEProviderStopReason, completionHandler: @escaping () -> Void) { - // Add code here to start the process of stopping the tunnel. - completionHandler() - } - - override func handleAppMessage(_ messageData: Data, completionHandler: ((Data?) -> Void)?) { - // Add code here to handle the message. - if let handler = completionHandler { - handler(messageData) - } - } - - override func sleep(completionHandler: @escaping () -> Void) { - // Add code here to get ready to sleep. - completionHandler() - } - - override func wake() { - // Add code here to wake up. - } -} |