I have a TransparentProxyProvider VPN implemented in a xcode-project, and it contains the systemextension (TransparentProxyProvider) and an App which configures and enables the VPN. Both of these are inside same AppSanbox.
Now I have another service (a C++ Project) which needs to takes some action when the above VPN status is changing (from Disconnected -> Connecting -> Connected). I have this limitation that I cannot put this service in the same project where SystemExtension is build.
Is there a method available using which I can add observer on the VPN status outside process?
I have related question
It’s probably best to put that in a separate thread.
With regards your original issue, if all your code is from the same team then you could:
-
Track the VPN state within your sysex (it seems likely that you’re already doing that).
-
Have the sysex publish an XPC service that vends that state.
-
Have your unrelated daemon use that XPC service to learn about state changes.
Alternatively, is your service visible to SCNetworkConnection
? If so, SCNetworkConnectionGetStatus
might be sufficient for your needs.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"