VPN On Demand Rules

Set up VPN On Demand.

Overview

VPN On Demand allows the system to automatically start or stop a VPN connection based on various criteria. For example, you can use VPN On Demand to configure an iPhone to start a VPN connection when it’s on Wi-Fi and stop the connection when it’s on cellular. Or, you can start the VPN connection when an app tries to connect to a specific service that’s only available via VPN.

For more information, see “VPN On Demand” in either the iOS Deployment Reference or the macOS Deployment Reference.

Topics

Settings

NEOnDemandRuleConnect

A VPN On Demand rule that connects the VPN.

NEOnDemandRuleDisconnect

A VPN On Demand rule that disconnects the VPN.

NEOnDemandRuleIgnore

A VPN On Demand rule that doesn’t change the status of the VPN.

NEOnDemandRuleEvaluateConnection

A VPN On Demand rule that evaluate the app’s connection to determine whether to run its action.

NEOnDemandRule

A base class shared by all VPN On Demand rules.

See Also

VPN Configuration

NETunnelProviderManager

An object to create and manage the tunnel provider’s VPN configuration.

NEVPNManager

An object to create and manage a Personal VPN configuration.

NETunnelProviderProtocol

Configuration parameters for a VPN tunnel.

NEAppRule

The identity of an app whose traffic is to be routed through the tunnel.