Contents

Packet tunnel provider

Implement a VPN client for a packet-oriented, custom VPN protocol.

Overview

A virtual private network (VPN) is a form of network tunnel where a VPN client uses the public Internet to create a connection to a VPN server and then passes private network traffic over that connection. If you want to build a VPN client that implements a packet-oriented, custom VPN protocol, create a packet tunnel provider app extension.

When the system starts a VPN configuration that uses your packet tunnel provider, it performs the following steps:

  • Launches your app extension.

  • Instantiates your packet tunnel provider subclass within that app extension.

  • Starts forwarding packets to your provider.

Your provider should open a tunnel to a VPN server and send those packets over that tunnel. Similarly, if your provider receives packets from the tunnel, it should pass them back to the system.

Packet tunnel providers can run in destination IP mode or source-application mode. The latter is one form of per-app VPN (the other form is an App proxy provider).

For detailed information about packet tunnel provider deployment options, see TN3134: Network Extension provider deployment.

Topics

Essentials

Packet tunnel provider

Packet handling

VPN configuration

VPN control

See Also

Virtual private networks