Developing custom VPN adapter protocol

Hello all!

From my customer got a question about ability to develop own VPN protocol adapter for customers own VPN logic on iPhone/iPad and maybe on MacOS. They using proprietary protocol that not in any list of public protocols.

For this case got few questions:

  1. This protocol based on TCP socket, therefore all of traffic from must be redirected somehow into it and replies from servers forwarded back to device. What is the best way to do it? Which approach better to use for it:
  1. Is there any public examples of any of this approaches?

  2. Is there any extended public manuals or references of how it works on iOS?

  3. Will be there any troubles for submission at AppStore?

Replies

I can answer a few of these questions for you as a starting point.

Regarding:

This protocol based on TCP socket, therefore all of traffic from must be redirected somehow into it and replies from servers forwarded back to device. What is the best way to do it?

If you plan is to go to the App Store then take a look at NEPacketTunnelProvider.

Instead of sockets, NEPacketTunnelProvider provides these tunnel based APIs NWTCPConnection and NWUDPSession to create your custom protocol with.

Regarding:

Is there any public examples of any of this approaches?

Examples are pretty sparse but if you look around on these Developer Forums you should see some.

Regarding:

Is there any extended public manuals or references of how it works on iO

I would start by reading through the documentation for NEPacketTunnelProvider