This is on a Mac. I am using MWPathMonitor to catch changes in the interfaces, I need to work out when a VPN is turned on. Certain VPNs, but not all, interfere with our project.
At the moment I create a MWPathMonitor and listen to changes via the NWPathMonitor.pathUpdateHandler callback.
That seems to work. When I turn on or off my VPN I get a new interface on the utun10. I test for utun*
My question is, is this reliable? Can there be more than one utun* interfaces even if VPN is not on?
Also what else should I look for to test for VPN, if any.
At the moment I create a MWPathMonitor and listen to changes via the NWPathMonitor.pathUpdateHandler callback.
That seems to work. When I turn on or off my VPN I get a new interface on the utun10. I test for utun*
My question is, is this reliable? Can there be more than one utun* interfaces even if VPN is not on?
Also what else should I look for to test for VPN, if any.