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