Add on demand rule.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
0adb454bd6
commit
a95212fcc8
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue