5

I'm working on a custom iOS OpenVPN client. I found this native OpenVPN client core sources https://staging.openvpn.net/openvpn3/

I can build it for the iOS platform.

How can I integrate this OpenVPNClient as an extension to set up an OpenVPN network for iOS devices from my application? Is it possible?

TMob
  • 1,278
  • 1
  • 13
  • 33
Alex Bakhitn
  • 59
  • 1
  • 3

2 Answers2

2

I think you should use the Network Extension framework to extend VPN capabilities of an iOS device. The documentation can be found at the link:

https://developer.apple.com/library/ios/documentation/NetworkExtension/Reference/Network_Extension_Framework_Reference/

As stated at the beginning of the linked document in order for your app to be able to use the above framework you need a special permission from Apple:

IMPORTANT

Most Network Extension classes require you to obtain an entitlement from Apple before using them in your code. To request entitlements, visit https://developer.apple.com/contact/network-extension.

It may or may not be possible to test the framework without such permission in your development devices, however it is unlikely that you can publish the resulting application to the market.

pqnet
  • 6,070
  • 1
  • 30
  • 51
  • How do you think is this OpenVPNClient is compatibly with Network Extension framework? I mean API interfaces. – Alex Bakhitn May 25 '16 at 14:56
  • @AlexBakhitn I can imagine that they area bit different. openvpn was published in 2013, while the NetworkExtension API was first made public in 2016. You might try contacting Gert Doering though who wrote the openvpn client for ios though https://plus.google.com/u/0/102486415329787631392/posts/faSspbtGkcW – Moataz Elmasry Aug 23 '16 at 22:29
2

You could use NEPacketTunnelProvider api in Network Extension Framework. The packet tunnel provider allow you to create your own vpn tunnel in iOS and the network traffic (raw ip packet) would be routed to your own vpn tunnel. But you may need to handle raw ip packet and integrate with openvpn3.