I've implemented a VPN apps (for iOS and for macOS) with Packet Tunnel Provider.
The includedRoutes contains all the IPv4 default routes:
newSettings.ipv4Settings?.includedRoutes = [NEIPv4Route.default()]
My question is regarding local networks:
If I'm not using split tunnel (not including/excluding any other route), what happens to traffic to the local network? By local network I mean the network the device is connected to without the client.
I expected that all traffic should go to the tunnel, but I see that I'm able to access resources on my local network even when the tunnel is up.
In addition to that, I checked the new flag - includeAllNetworksr which is relevant only to macOS:
If this flag is set, I can't access the local network when the VPN is up.
So the question is how to configure if the user is able or unable to access resources on his local tunnel.
Maybe using the above flag is the answer? And if it is the answer, then what about iOS?
Edit: When includeAllNetworks is set, sometimes I don't have traffic at all, and I see some errors at the Console, not sure if it's related.