Class

NETunnelProvider

An abstract base class shared by NEPacketTunnelProvider and NEAppProxyProvider.

Declaration

@interface NETunnelProvider : NEProvider

Overview

Each NETunnelProvider instance corresponds to a single tunneling session, with a single associated configuration.

Subclassing Notes

The NETunnelProvider class should not be subclassed directly. Instead, you should create subclasses of NETunnelProvider subclasses.

Methods to Override

Topics

Getting the Tunnel Configuration

protocolConfiguration

The configuration of the current tunneling session.

routingMethod

The method by which network traffic is routed to the tunnel.

appRules

The app rules dictating which apps will use the current tunneling session.

Configuring the Tunnel Interface

- setTunnelNetworkSettings:completionHandler:

Specify the network settings for the current tunneling session.

Communicating with the Containing App

- handleAppMessage:completionHandler:

Handle messages sent by the tunnel provider extension’s containing app

Setting Tunnel Status

reasserting

Indicate to the system that the tunnel is being re-established.

Errors

NETunnelProviderErrorDomain

The domain used for Tunnel Provider errors.

Relationships

Inherits From

See Also

Packet Tunnel Provider

NEPacketTunnelProvider

The principal class for a packet tunnel provider app extension.

NEProvider

An abstract base class for all NetworkExtension providers.

NEPacketTunnelNetworkSettings

The configuration for a packet tunnel provider’s virtual interface.

NETunnelNetworkSettings

The configuration for a tunnel provider’s virtual interface.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software