Default to server settings for default gateway

IPv6 is not necessarily supported.
This commit is contained in:
Davide De Rosa 2019-05-11 15:58:47 +02:00
parent 547746e0d9
commit accd04eead
2 changed files with 3 additions and 3 deletions

View File

@ -357,7 +357,7 @@ public class ConnectionService: Codable {
// fall back to the safer option
var builder = host.parameters.builder()
var sessionBuilder = builder.sessionConfiguration.builder()
sessionBuilder.routingPolicies = [.IPv4, .IPv6]
sessionBuilder.routingPolicies = [.IPv4]
builder.sessionConfiguration = sessionBuilder.build()
host.parameters = builder.build()
}

View File

@ -186,8 +186,8 @@ public struct InfrastructurePreset: Codable {
sessionBuilder.randomizeEndpoint = try cfgContainer.decodeIfPresent(Bool.self, forKey: .randomizeEndpoint) ?? false
sessionBuilder.usesPIAPatches = try cfgContainer.decodeIfPresent(Bool.self, forKey: .usesPIAPatches) ?? false
// XXX: redirect everything through the VPN for providers
sessionBuilder.routingPolicies = [.IPv4, .IPv6]
// default to server settings
sessionBuilder.routingPolicies = nil
let builder = TunnelKitProvider.ConfigurationBuilder(sessionConfiguration: sessionBuilder.build())
configuration = builder.build()