parent
b38f033a13
commit
8219519a22
|
@ -217,16 +217,19 @@ class ConnectionService: Codable {
|
|||
guard let profile = activeProfile else {
|
||||
throw ApplicationError.missingProfile
|
||||
}
|
||||
guard let credentials = credentials(for: profile) else {
|
||||
let creds = credentials(for: profile)
|
||||
if profile.requiresCredentials {
|
||||
guard creds != nil else {
|
||||
throw ApplicationError.missingCredentials
|
||||
}
|
||||
}
|
||||
|
||||
let cfg = try profile.generate(from: tunnelConfiguration, preferences: preferences)
|
||||
let protocolConfiguration = try cfg.generatedTunnelProtocol(
|
||||
withBundleIdentifier: GroupConstants.App.tunnelIdentifier,
|
||||
appGroup: appGroup,
|
||||
hostname: profile.mainAddress,
|
||||
credentials: credentials
|
||||
credentials: creds
|
||||
)
|
||||
protocolConfiguration.disconnectOnSleep = preferences.disconnectsOnSleep
|
||||
|
||||
|
|
Loading…
Reference in New Issue