Regroup targets
Prefix "internal" modules with underscore.
This commit is contained in:
parent
0978b973eb
commit
92fd620771
|
@ -11,20 +11,16 @@ let package = Package(
|
|||
products: [
|
||||
// Products define the executables and libraries a package produces, and make them visible to other packages.
|
||||
.library(
|
||||
name: "TunnelKitCore",
|
||||
targets: ["TunnelKitCore"]
|
||||
name: "TunnelKit",
|
||||
targets: [
|
||||
"TunnelKitCore",
|
||||
"TunnelKitAppExtension",
|
||||
"TunnelKitManager"
|
||||
]
|
||||
),
|
||||
.library(
|
||||
name: "TunnelKitAppExtension",
|
||||
targets: ["TunnelKitAppExtension"]
|
||||
),
|
||||
.library(
|
||||
name: "TunnelKitManager",
|
||||
targets: ["TunnelKitManager"]
|
||||
),
|
||||
.library(
|
||||
name: "TunnelKitNative",
|
||||
targets: ["TunnelKitNative"]
|
||||
name: "TunnelKitIKE",
|
||||
targets: ["TunnelKitIKE"]
|
||||
),
|
||||
.library(
|
||||
name: "TunnelKitOpenVPN",
|
||||
|
@ -47,11 +43,11 @@ let package = Package(
|
|||
.target(
|
||||
name: "TunnelKitCore",
|
||||
dependencies: [
|
||||
"InternalUtils",
|
||||
"TunnelKitCoreObjC",
|
||||
"_TunnelKitUtils",
|
||||
"_TunnelKitCoreObjC",
|
||||
"SwiftyBeaver"]),
|
||||
.target(
|
||||
name: "TunnelKitCoreObjC",
|
||||
name: "_TunnelKitCoreObjC",
|
||||
dependencies: []),
|
||||
.target(
|
||||
name: "TunnelKitAppExtension",
|
||||
|
@ -63,7 +59,7 @@ let package = Package(
|
|||
dependencies: [
|
||||
"TunnelKitCore"]),
|
||||
.target(
|
||||
name: "TunnelKitNative",
|
||||
name: "TunnelKitIKE",
|
||||
dependencies: [
|
||||
"TunnelKitCore",
|
||||
"TunnelKitManager"]),
|
||||
|
@ -71,13 +67,13 @@ let package = Package(
|
|||
name: "TunnelKitOpenVPN",
|
||||
dependencies: [
|
||||
"TunnelKitCore",
|
||||
"TunnelKitOpenVPNObjC",
|
||||
"_TunnelKitOpenVPNObjC",
|
||||
"TunnelKitAppExtension",
|
||||
"TunnelKitManager"]),
|
||||
.target(
|
||||
name: "TunnelKitOpenVPNObjC",
|
||||
name: "_TunnelKitOpenVPNObjC",
|
||||
dependencies: [
|
||||
"TunnelKitCoreObjC",
|
||||
"_TunnelKitCoreObjC",
|
||||
"openssl-apple"]),
|
||||
.target(
|
||||
name: "TunnelKitLZO",
|
||||
|
@ -88,20 +84,20 @@ let package = Package(
|
|||
"lib/README.LZO"
|
||||
]),
|
||||
.target(
|
||||
name: "InternalUtils",
|
||||
name: "_TunnelKitUtils",
|
||||
dependencies: []),
|
||||
.testTarget(
|
||||
name: "TunnelKitCoreTests",
|
||||
dependencies: [
|
||||
"TunnelKitCore",
|
||||
"TunnelKitCoreObjC"
|
||||
"_TunnelKitCoreObjC"
|
||||
]),
|
||||
.testTarget(
|
||||
name: "TunnelKitOpenVPNTests",
|
||||
dependencies: [
|
||||
"TunnelKitCoreTests",
|
||||
"TunnelKitOpenVPN",
|
||||
"TunnelKitOpenVPNObjC",
|
||||
"_TunnelKitOpenVPNObjC",
|
||||
"TunnelKitLZO"
|
||||
],
|
||||
resources: [
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
//
|
||||
|
||||
import Foundation
|
||||
import TunnelKitCoreObjC
|
||||
import _TunnelKitCoreObjC
|
||||
|
||||
extension Error {
|
||||
public func isTunnelKitError() -> Bool {
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
|
||||
import Foundation
|
||||
import Security.SecRandom
|
||||
import TunnelKitCoreObjC
|
||||
import InternalUtils
|
||||
import _TunnelKitCoreObjC
|
||||
import _TunnelKitUtils
|
||||
|
||||
/// :nodoc:
|
||||
public enum SecureRandomError: Error {
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
//
|
||||
|
||||
import Foundation
|
||||
import TunnelKitCoreObjC
|
||||
import _TunnelKitCoreObjC
|
||||
|
||||
public func Z() -> ZeroingData {
|
||||
return ZeroingData()
|
||||
|
|
|
@ -1 +1 @@
|
|||
../../TunnelKitCoreObjC/include/Errors.h
|
||||
../../_TunnelKitCoreObjC/include/Errors.h
|
|
@ -27,7 +27,7 @@ import Foundation
|
|||
import NetworkExtension
|
||||
import TunnelKitCore
|
||||
import TunnelKitAppExtension
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
class NETCPLink: LinkInterface {
|
||||
private let impl: NWTCPConnection
|
||||
|
|
|
@ -38,9 +38,9 @@ import Foundation
|
|||
import NetworkExtension
|
||||
import SwiftyBeaver
|
||||
import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import TunnelKitAppExtension
|
||||
import InternalUtils
|
||||
import _TunnelKitUtils
|
||||
|
||||
private let log = SwiftyBeaver.self
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ import SystemConfiguration.CaptiveNetwork
|
|||
import CoreWLAN
|
||||
#endif
|
||||
import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import TunnelKitAppExtension
|
||||
|
||||
private let log = SwiftyBeaver.self
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
import Foundation
|
||||
import SwiftyBeaver
|
||||
import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
private let log = SwiftyBeaver.self
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
//
|
||||
|
||||
import Foundation
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
extension OpenVPN {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
//
|
||||
|
||||
import Foundation
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
extension OpenVPN {
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
import Foundation
|
||||
import SwiftyBeaver
|
||||
import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import InternalUtils
|
||||
import _TunnelKitCoreObjC
|
||||
import _TunnelKitUtils
|
||||
|
||||
private let log = SwiftyBeaver.self
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
import Foundation
|
||||
import SwiftyBeaver
|
||||
import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
private let log = SwiftyBeaver.self
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
import Foundation
|
||||
import SwiftyBeaver
|
||||
import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
private let log = SwiftyBeaver.self
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
|
||||
import Foundation
|
||||
import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
extension CoreConfiguration {
|
||||
struct OpenVPN {
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
//
|
||||
|
||||
import Foundation
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
extension OpenVPN {
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
|
||||
import Foundation
|
||||
import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
extension OpenVPN {
|
||||
class EncryptionBridge {
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
import Foundation
|
||||
import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
/// Container for OpenVPN classes.
|
||||
public class OpenVPN {
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
import Foundation
|
||||
import SwiftyBeaver
|
||||
import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
private let log = SwiftyBeaver.self
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
|
||||
import Foundation
|
||||
import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
/// :nodoc:
|
||||
extension ControlPacket {
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
import Foundation
|
||||
import SwiftyBeaver
|
||||
import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
private let log = SwiftyBeaver.self
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
import Foundation
|
||||
import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import _TunnelKitCoreObjC
|
||||
|
||||
extension OpenVPN {
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
//
|
||||
|
||||
import XCTest
|
||||
import TunnelKitCoreObjC
|
||||
import _TunnelKitCoreObjC
|
||||
|
||||
class RoutingTests: XCTestCase {
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
import XCTest
|
||||
@testable import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import TunnelKitLZO
|
||||
|
||||
class CompressionTests: XCTestCase {
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
|
||||
import XCTest
|
||||
@testable import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import _TunnelKitCoreObjC
|
||||
@testable import TunnelKitOpenVPN
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
class ControlChannelTests: XCTestCase {
|
||||
private let hex = "634a4d2d459d606c8e6abbec168fdcd1871462eaa2eaed84c8f403bdf8c7da737d81b5774cc35fe0a42b38aa053f1335fd4a22d721880433bbb20ae1f2d88315b2d186b3b377685506fa39d85d38da16c2ecc0d631bda64f9d8f5a8d073f18aab97ade23e49ea9e7de86784d1ed5fa356df5f7fa1d163e5537efa8d4ba61239dc301a9aa55de0e06e33a7545f7d0cc153405576464ba92942dafa5fb79c7a60663ff1e7da3122ae09d4561653bef3eeb312ad68b191e2f94cbcf4e21caff0b59f8be86567bd21787070c2dc10a8baf7e87ce2e07d7d7de25ead11bd6d6e6ec030c0a3fd50d2d0ca3c0378022bb642e954868d7b93e18a131ecbb12b0bbedb1ce"
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
|
||||
import XCTest
|
||||
@testable import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
class DataPathEncryptionTests: XCTestCase {
|
||||
private let cipherKey = try! SecureRandom.safeData(length: 32)
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
import XCTest
|
||||
@testable import TunnelKitCore
|
||||
@testable import TunnelKitOpenVPN
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
import TunnelKitCoreTests
|
||||
|
||||
class DataPathPerformanceTests: XCTestCase {
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
|
||||
import XCTest
|
||||
@testable import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
import TunnelKitCoreTests
|
||||
|
||||
class EncryptionPerformanceTests: XCTestCase {
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
|
||||
import XCTest
|
||||
@testable import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import TunnelKitOpenVPN
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
class EncryptionTests: XCTestCase {
|
||||
private var cipherEncKey: ZeroingData!
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
import XCTest
|
||||
@testable import TunnelKitCore
|
||||
@testable import TunnelKitCoreObjC
|
||||
@testable import _TunnelKitCoreObjC
|
||||
import TunnelKitCoreTests
|
||||
|
||||
class LinkTests: XCTestCase {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
import XCTest
|
||||
@testable import TunnelKitCore
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
class PacketTests: XCTestCase {
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
|
||||
import Foundation
|
||||
@testable import TunnelKitCore
|
||||
import TunnelKitCoreObjC
|
||||
import TunnelKitOpenVPNObjC
|
||||
import _TunnelKitCoreObjC
|
||||
import _TunnelKitOpenVPNObjC
|
||||
|
||||
extension Encrypter {
|
||||
func encryptData(_ data: Data, flags: UnsafePointer<CryptoFlags>?) throws -> Data {
|
||||
|
|
Loading…
Reference in New Issue