Update TunnelKit
- Set explicit tunnel log path - OpenSSL 1.1.1o
This commit is contained in:
parent
bb1a35acea
commit
02a9db057f
|
@ -33,8 +33,8 @@
|
||||||
"repositoryURL": "https://github.com/passepartoutvpn/openssl-apple",
|
"repositoryURL": "https://github.com/passepartoutvpn/openssl-apple",
|
||||||
"state": {
|
"state": {
|
||||||
"branch": null,
|
"branch": null,
|
||||||
"revision": "cbbff97a99384a5415bb47c072c376066b78f65f",
|
"revision": "1c03f4d3fc1d90a0a525af68f06eada56e5e8bb1",
|
||||||
"version": "1.1.11300"
|
"version": "1.1.11500"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
"repositoryURL": "https://github.com/passepartoutvpn/tunnelkit",
|
"repositoryURL": "https://github.com/passepartoutvpn/tunnelkit",
|
||||||
"state": {
|
"state": {
|
||||||
"branch": null,
|
"branch": null,
|
||||||
"revision": "6e0471a55b8277ff0b21e4dd3dfcfcc8da5f0355",
|
"revision": "36ed23ccc4e6083d671b6b823f50787b018f2844",
|
||||||
"version": null
|
"version": null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -157,8 +157,14 @@ extension Constants {
|
||||||
.appendingPathComponent(filename)
|
.appendingPathComponent(filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static func containerLogPath(filename: String) -> String {
|
||||||
|
"\(parentPath)/\(filename)"
|
||||||
|
}
|
||||||
|
|
||||||
static let appLogURL = containerLogURL(filename: "App.log")
|
static let appLogURL = containerLogURL(filename: "App.log")
|
||||||
|
|
||||||
|
static let tunnelLogPath = containerLogPath(filename: "Tunnel.log")
|
||||||
|
|
||||||
static let logLevel: SwiftyBeaver.Level = {
|
static let logLevel: SwiftyBeaver.Level = {
|
||||||
guard let levelString = ProcessInfo.processInfo.environment["LOG_LEVEL"], let levelNum = Int(levelString) else {
|
guard let levelString = ProcessInfo.processInfo.environment["LOG_LEVEL"], let levelNum = Int(levelString) else {
|
||||||
return .info
|
return .info
|
||||||
|
|
|
@ -112,6 +112,7 @@ class CoreContext {
|
||||||
|
|
||||||
private func configureObjects() {
|
private func configureObjects() {
|
||||||
providerManager.rateLimitMilliseconds = Constants.RateLimit.providerManager
|
providerManager.rateLimitMilliseconds = Constants.RateLimit.providerManager
|
||||||
|
vpnManager.tunnelLogPath = Constants.Log.tunnelLogPath
|
||||||
vpnManager.tunnelLogFormat = Constants.Log.tunnelLogFormat
|
vpnManager.tunnelLogFormat = Constants.Log.tunnelLogFormat
|
||||||
|
|
||||||
profileManager.observeUpdates()
|
profileManager.observeUpdates()
|
||||||
|
|
|
@ -24,7 +24,7 @@ let package = Package(
|
||||||
// Dependencies declare other packages that this package depends on.
|
// Dependencies declare other packages that this package depends on.
|
||||||
// .package(url: /* package url */, from: "1.0.0"),
|
// .package(url: /* package url */, from: "1.0.0"),
|
||||||
// .package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", from: "4.1.0"),
|
// .package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", from: "4.1.0"),
|
||||||
.package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", .revision("6e0471a55b8277ff0b21e4dd3dfcfcc8da5f0355")),
|
.package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", .revision("36ed23ccc4e6083d671b6b823f50787b018f2844")),
|
||||||
// .package(name: "TunnelKit", path: "../../tunnelkit"),
|
// .package(name: "TunnelKit", path: "../../tunnelkit"),
|
||||||
.package(url: "https://github.com/zoul/generic-json-swift", from: "2.0.0"),
|
.package(url: "https://github.com/zoul/generic-json-swift", from: "2.0.0"),
|
||||||
.package(url: "https://github.com/SwiftyBeaver/SwiftyBeaver", from: "1.9.0")
|
.package(url: "https://github.com/SwiftyBeaver/SwiftyBeaver", from: "1.9.0")
|
||||||
|
|
|
@ -56,6 +56,7 @@ extension Profile.OpenVPNSettings: VPNConfigurationProviding {
|
||||||
configuration: customConfiguration
|
configuration: customConfiguration
|
||||||
)
|
)
|
||||||
cfg.shouldDebug = true
|
cfg.shouldDebug = true
|
||||||
|
cfg.debugLogPath = parameters.preferences.tunnelLogPath
|
||||||
cfg.debugLogFormat = parameters.preferences.tunnelLogFormat
|
cfg.debugLogFormat = parameters.preferences.tunnelLogFormat
|
||||||
cfg.masksPrivateData = parameters.preferences.masksPrivateData
|
cfg.masksPrivateData = parameters.preferences.masksPrivateData
|
||||||
cfg.username = parameters.username
|
cfg.username = parameters.username
|
||||||
|
|
|
@ -47,6 +47,7 @@ extension Profile.WireGuardSettings: VPNConfigurationProviding {
|
||||||
configuration: customConfiguration
|
configuration: customConfiguration
|
||||||
)
|
)
|
||||||
cfg.shouldDebug = true
|
cfg.shouldDebug = true
|
||||||
|
cfg.debugLogPath = parameters.preferences.tunnelLogPath
|
||||||
cfg.debugLogFormat = parameters.preferences.tunnelLogFormat
|
cfg.debugLogFormat = parameters.preferences.tunnelLogFormat
|
||||||
|
|
||||||
var extra = NetworkExtensionExtra()
|
var extra = NetworkExtensionExtra()
|
||||||
|
|
|
@ -28,6 +28,7 @@ import Foundation
|
||||||
extension VPNManager {
|
extension VPNManager {
|
||||||
private var vpnPreferences: VPNPreferences {
|
private var vpnPreferences: VPNPreferences {
|
||||||
DefaultVPNPreferences(
|
DefaultVPNPreferences(
|
||||||
|
tunnelLogPath: tunnelLogPath,
|
||||||
tunnelLogFormat: tunnelLogFormat,
|
tunnelLogFormat: tunnelLogFormat,
|
||||||
masksPrivateData: masksPrivateData
|
masksPrivateData: masksPrivateData
|
||||||
)
|
)
|
||||||
|
|
|
@ -259,6 +259,15 @@ extension VPNManager {
|
||||||
// MARK: KeyValueStore
|
// MARK: KeyValueStore
|
||||||
|
|
||||||
extension VPNManager {
|
extension VPNManager {
|
||||||
|
public var tunnelLogPath: String? {
|
||||||
|
get {
|
||||||
|
store.value(forLocation: StoreKey.tunnelLogPath)
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
store.setValue(newValue, forLocation: StoreKey.tunnelLogPath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public var tunnelLogFormat: String? {
|
public var tunnelLogFormat: String? {
|
||||||
get {
|
get {
|
||||||
store.value(forLocation: StoreKey.tunnelLogFormat)
|
store.value(forLocation: StoreKey.tunnelLogFormat)
|
||||||
|
@ -282,6 +291,8 @@ extension VPNManager {
|
||||||
|
|
||||||
private extension VPNManager {
|
private extension VPNManager {
|
||||||
private enum StoreKey: String, KeyStoreDomainLocation {
|
private enum StoreKey: String, KeyStoreDomainLocation {
|
||||||
|
case tunnelLogPath
|
||||||
|
|
||||||
case tunnelLogFormat
|
case tunnelLogFormat
|
||||||
|
|
||||||
case masksPrivateData
|
case masksPrivateData
|
||||||
|
|
|
@ -281,10 +281,10 @@ extension VPNManager {
|
||||||
public func debugLogURL(forProtocol vpnProtocol: VPNProtocolType) -> URL? {
|
public func debugLogURL(forProtocol vpnProtocol: VPNProtocolType) -> URL? {
|
||||||
switch vpnProtocol {
|
switch vpnProtocol {
|
||||||
case .openVPN:
|
case .openVPN:
|
||||||
return FileManager.default.openVPNURLForDebugLog(appGroup: appGroup)
|
return defaults.openVPNURLForDebugLog(appGroup: appGroup)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return FileManager.default.wireGuardURLForDebugLog(appGroup: appGroup)
|
return defaults.wireGuardURLForDebugLog(appGroup: appGroup)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,12 +26,16 @@
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public protocol VPNPreferences {
|
public protocol VPNPreferences {
|
||||||
|
var tunnelLogPath: String? { get }
|
||||||
|
|
||||||
var tunnelLogFormat: String? { get }
|
var tunnelLogFormat: String? { get }
|
||||||
|
|
||||||
var masksPrivateData: Bool { get }
|
var masksPrivateData: Bool { get }
|
||||||
}
|
}
|
||||||
|
|
||||||
struct DefaultVPNPreferences: VPNPreferences {
|
struct DefaultVPNPreferences: VPNPreferences {
|
||||||
|
let tunnelLogPath: String?
|
||||||
|
|
||||||
let tunnelLogFormat: String?
|
let tunnelLogFormat: String?
|
||||||
|
|
||||||
let masksPrivateData: Bool
|
let masksPrivateData: Bool
|
||||||
|
|
Loading…
Reference in New Issue