diff --git a/Passepartout/Sources/Model/Profiles/HostConnectionProfile.swift b/Passepartout/Sources/Model/Profiles/HostConnectionProfile.swift index 88674a88..9b8770ad 100644 --- a/Passepartout/Sources/Model/Profiles/HostConnectionProfile.swift +++ b/Passepartout/Sources/Model/Profiles/HostConnectionProfile.swift @@ -66,6 +66,9 @@ public class HostConnectionProfile: ConnectionProfile, Codable, Equatable { builder.debugLogFormat = configuration.debugLogFormat builder.masksPrivateData = configuration.masksPrivateData + // forcibly override hostname with profile hostname (never nil) + builder.sessionConfiguration.hostname = hostname + return builder.build() } diff --git a/Passepartout/Sources/Model/Profiles/ProviderConnectionProfile.swift b/Passepartout/Sources/Model/Profiles/ProviderConnectionProfile.swift index aeacd5c4..9516ed4c 100644 --- a/Passepartout/Sources/Model/Profiles/ProviderConnectionProfile.swift +++ b/Passepartout/Sources/Model/Profiles/ProviderConnectionProfile.swift @@ -121,11 +121,12 @@ public class ProviderConnectionProfile: ConnectionProfile, Codable, Equatable { builder.debugLogFormat = configuration.debugLogFormat builder.masksPrivateData = configuration.masksPrivateData - if builder.sessionConfiguration.hostname == nil { - builder.resolvedAddresses = pool.addresses() - } else if let address = manualAddress { + if let address = manualAddress { builder.prefersResolvedAddresses = true builder.resolvedAddresses = [address] + } else if builder.sessionConfiguration.hostname == nil { + builder.prefersResolvedAddresses = true + builder.resolvedAddresses = pool.addresses() } else { builder.prefersResolvedAddresses = !preferences.resolvesHostname builder.resolvedAddresses = pool.addresses()