I've implemented a VPN app with Packet Tunnel Provider for iOS/macOS.
When I'm trying to connect, and the VPN is at connecting state, all network connectivity is blocked.
But from the documentation of startTunnelWithOptions, it seems that the OS shouldn't block the connectivity until I call to the startTunnelWithOptions' completion block
When the Packet Tunnel Provider executes the completionHandler block with a nil error parameter,
it signals to the system that it is ready to begin handling network data.
What I want is to allow some URLs to be accessible even at the connection state, or ot another words - to exclude some routes even before I have the tunnel. Is it possible?
I would expect that the network traffic is operational on the system until the VPN is connected and the default route can attempt to route the traffic.
One possibility is that the onDemandRule is delaying traffic on the system while attempting to establish the VPN tunnel. Test this with the onDemandRule disabled and this should provide you with a path to investigate further. If you see traffic active while the tunnel is established then you know the onDemandRule was delaying traffic.
Matt Eaton
DTS Engineering, CoreOS
meaton3 at apple.com