Add on demand rule.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jeroen Leenarts 2018-08-16 22:04:35 +02:00
parent 0adb454bd6
commit a95212fcc8
1 changed files with 4 additions and 1 deletions

View File

@ -241,7 +241,10 @@ extension AppCoordinator: TunnelConfigurationTableViewControllerDelegate {
protocolConfiguration.providerConfiguration = tunnel.generateProviderConfiguration()
manager.protocolConfiguration = protocolConfiguration
manager.onDemandRules = [NEOnDemandRuleConnect()]
let connectRule = NEOnDemandRuleConnect()
connectRule.interfaceTypeMatch = .any
manager.onDemandRules = [connectRule]
// manager.isOnDemandEnabled = true
manager.saveToPreferences { (error) in
if let error = error {