4

I am new to IOS - Swift. I don't know how to config openVPN programmatically in swift. I have .ovpn file. I am able to config the .ovpn file via "openVPN connect APP"(which is available in itunes) its working fine and vpn is configured. But i don't know how to do the same in my app(i.e without openVPN connect App). I surfed over net for more than a week i didn't get any idea to do this.

Is There any possibility to do this programmatically. If so how to do? Please help me to get success.

  • Maybe this will help: https://developer.apple.com/library/ios/samplecode/SimpleTunnel/Listings/SimpleTunnel_StatusViewController_swift.html – Hodson Jun 07 '16 at 14:28
  • @SundaraVaradhan I have also same requirement as you have, did you get any regarding 'openVPN' implementation. Please let me know if you get. Any help will be acceptable. – Himanshu padia Jun 11 '18 at 09:06

1 Answers1

2

Unfortunately, the OpenVPN library is licensed under AGPLV3, which forbids it from being put on the App Store. The only app that truly uses OpenVPN protocol is OpenVPN Connect, and they have a partnership with Apple that gives them access to things on the iOS device that allows them to control it in ways that general developers cannot. The only option left is to fully implement the OpenVPN protocol yourself by writing your own implementation of it using the NEVPNManager API from the NetworkExtension API for iOS.

Take a look here for more details: https://github.com/OpenVPN/openvpn3/issues/1

Nathan F.
  • 3,250
  • 3
  • 35
  • 69