Add on demand rule.
This commit is contained in:
parent
6b57ca0d98
commit
11b43206ff
|
@ -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