We are developing a DLP agent that uses a NETransparentProxyProvider to perform traffic inspection and modification. Our architecture currently includes:
- LaunchAgent, which monitors user session activity (login/logout, session activation)
- Container App, which:
- installs and activates a System Extension
- creates and saves the NETransparentProxyManager configuration
- starts the transparent proxy via startVPNTunnel.
We would like to automate the startup of the Transparent Proxy for all users, including newly created users, in a way that is fully supported by macOS. We are looking for official guidance on the correct and supported mechanism for starting a user‑level Network Extension (specifically NETransparentProxyProvider) automatically at user login.
Questions:
- What is the recommended and supported way to automatically start a NETransparentProxyProvider at user login?
- Are there any constraints or best practices we should follow when designing an automatic startup flow for a Network Extension such as NETransparentProxyProvider?
We would appreciate official clarification on the supported deployment patterns for starting a user‑level Transparent Proxy Network Extension automatically in multi‑user enterprise environments.
Sorry it’s taken a while to get back to you here. I had to go back’n’forth with NE engineering about this, and WWDC didn’t exactly speed things up.
On the plus side, I learnt something new. I was originally under the impression that only the container app could get the manager object (NEAppProxyProviderManager in this case), get the connection object from that (via the connection property, of type NEVPNConnection), and thus start and stop the proxy. However, it seems I missed a critical memo. Once you’ve created the configuration — from the container app or using MDM — then any app that shares an app group with the container app can get the the manager object, get the connection property from that, and use that to start and stop the VPN.
Neat-o!
This means that you can return to your login approach, and create a launchd agent that starts the proxy on login.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"