Make default VPN configuration mutable
This commit is contained in:
parent
1cb315b44c
commit
9f6307dbc2
|
@ -47,7 +47,7 @@ public class AppConstants {
|
|||
}
|
||||
|
||||
public class VPN {
|
||||
public static func baseConfiguration() -> TunnelKitProvider.Configuration {
|
||||
public static var baseConfiguration: TunnelKitProvider.ConfigurationBuilder = {
|
||||
let sessionBuilder = SessionProxy.ConfigurationBuilder(ca: CryptoContainer(pem: ""))
|
||||
var builder = TunnelKitProvider.ConfigurationBuilder(sessionConfiguration: sessionBuilder.build())
|
||||
builder.mtu = 1250
|
||||
|
@ -55,8 +55,8 @@ public class AppConstants {
|
|||
// builder.debugLogFormat = "$Dyyyy-MM-dd HH:mm:ss.SSS$d $L $N.$F:$l - $M"
|
||||
// builder.debugLogFormat = "$DHH:mm:ss$d $N.$F:$l - $M"
|
||||
builder.debugLogFormat = Log.debugFormat
|
||||
return builder.build()
|
||||
}
|
||||
return builder
|
||||
}()
|
||||
|
||||
private static let connectivityStrings: [String] = [
|
||||
"https://www.amazon.com",
|
||||
|
|
|
@ -56,7 +56,7 @@ public class TransientStore {
|
|||
// this must be graceful
|
||||
ConnectionService.migrateJSON(from: TransientStore.serviceURL, to: TransientStore.serviceURL)
|
||||
|
||||
let cfg = AppConstants.VPN.baseConfiguration()
|
||||
let cfg = AppConstants.VPN.baseConfiguration.build()
|
||||
do {
|
||||
let data = try Data(contentsOf: TransientStore.serviceURL)
|
||||
if let content = String(data: data, encoding: .utf8) {
|
||||
|
|
Loading…
Reference in New Issue