Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Packet Tunnel Provider in iOS 9

iOS 9 has added Packet Tunnel Provider for implementing custom VPN Protocol.But there is no any information available regarding that. Has anyone come across on the implementation using this tunnel provider?

like image 499
Ashok Avatar asked Oct 31 '22 02:10

Ashok


1 Answers

Apple has released the Simple Tunnel sample code as shown in WWDC 15'

https://developer.apple.com/videos/wwdc/2015/?id=717

Here is the sample code: https://developer.apple.com/library/prerelease/ios/samplecode/SimpleTunnel/Introduction/Intro.html

You do need to add entitlements in order to run the app properly, to which you must email network support at apple I believe.

However if you download the sample code it is laid out very nice , just reverse engineer how the Packet Tunnel Provider works.

In the most basic terms the PacketTunnelProvider class allows you to set your options when connecting to a tunnel as set in startTunnelWithOption:completionHandler. Where as you pass the completion handler to the TunnelHelper to determine if it is a success or failure.

It is also used to read and write datagrams & handleMessages from the server.

like image 91
mKane Avatar answered Nov 12 '22 18:11

mKane