Instance Property

connectionRules

An array of NEEvaluateConnectionRule objects

Declaration

var connectionRules: [NEEvaluateConnectionRule]? { get set }

Discussion

Each NEEvaluateConnectionRule object defines a behavior to take for connections that match the domain of the rule. Each rule is evaluated in order against the properties of a network connection being established. An example configuration has two connection rules: a rule matching myserver.example.com with the domain action NEEvaluateConnectionRuleAction.neverConnect, followed by a rule matching example.com with the domain action NEEvaluateConnectionRuleAction.connectIfNeeded. This configuration would cause all connections to hostnames in example.com that do not resolve on the current network to trigger the VPN, except for myserver.example.com.

See Also

Accessing Connection Rules

class NEEvaluateConnectionRule

NEEvaluateConnectionRule associates properties of network connections with an action.