Multiple Packet Tunnel Provider targets

Hi,


Is it possibel to create multiple Packet Tunnel Provider targets in one VPN app, and configure which one to run by system accordingly?


My case is, I have customers whose requirements are very different, it turns out I have to process the packets in very different way. But I don't want to mix all the code and logic in one Packet Tunnel Provider target, so can I create multiple Packet Tunnel Provider targets in one VPN app and run one of them accordingly to configuration profile?

Replies

I think that’ll work. The trick is to make sure you set the provider bundle identifier in your VPN configuration (either the

providerBundleIdentifier
property of
NETunnelProviderProtocol
you use to configure the tunnel programmatically, or the
ProviderBundleIdentifier
property in the
com.apple.vpn.managed
configuration profile payload).

Having said that, I’ve never seen any actually do this, so your could run into unexpected difficulties.

Please post back with your experiences.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hello,


In my case, I want to run multiple types of VPN using a single VPN Configuration.

Currently, We have implemented NEPacketTunnelProvider to tunnel traffic via our proxy server. So, now, we also want to filter the content using NEFilterProvider.


I wanted to know whether is it possible to use the single Network Extension to implement multiple providers (Packet Tunnel Provider and Filter Provider).


Any help will be appreciated


Thanks,

In my case, I want to run multiple types of VPN using a single VPN Configuration.

So, now, we also want to filter the content using

NEFilterProvider
.

Just to be clear, a filter provider is not a type of VPN.

I wanted to know whether is it possible to use the single Network Extension to implement multiple providers (Packet Tunnel Provider and Filter Provider).

That depends on what you mean by “Network Extension”:

  • A single app can have, embedded within it, multiple NetworkExtension providers, and that includes a packet tunnel provider and the content filter provider pair (control and data).

  • If you’re asking whether a single provider can act as both a packet tunnel and a content filter, the answer is no. Each of these must be split out into its own provider, although all of those providers can be embedded within a single app.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"