From 5ce49953a083107d8aa4e86c48725300025ff8df Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sat, 11 May 2019 14:57:59 +0200 Subject: [PATCH] Assume empty policies to override server settings Empty != nil. When nil, pull from server. --- .../Sources/AppExtension/TunnelKitProvider+Configuration.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TunnelKit/Sources/AppExtension/TunnelKitProvider+Configuration.swift b/TunnelKit/Sources/AppExtension/TunnelKitProvider+Configuration.swift index a198a9d..0da9180 100644 --- a/TunnelKit/Sources/AppExtension/TunnelKitProvider+Configuration.swift +++ b/TunnelKit/Sources/AppExtension/TunnelKitProvider+Configuration.swift @@ -177,7 +177,7 @@ extension TunnelKitProvider { sessionConfigurationBuilder.httpsProxy = proxy } sessionConfigurationBuilder.proxyBypassDomains = providerConfiguration[S.proxyBypassDomains] as? [String] - if let routingPoliciesStrings = providerConfiguration[S.routingPolicies] as? [String], !routingPoliciesStrings.isEmpty { + if let routingPoliciesStrings = providerConfiguration[S.routingPolicies] as? [String] { sessionConfigurationBuilder.routingPolicies = try routingPoliciesStrings.map { guard let policy = SessionProxy.RoutingPolicy(rawValue: $0) else { throw ProviderConfigurationError.parameter(name: "protocolConfiguration.providerConfiguration[\(S.routingPolicies)] has a badly formed element")