Hi,
We are developing an app using PacketTunnelProvider from Network Extension framework. It is packaged as a system extension.
We are trying to implement an "always-on" functionality, but cannot manage to start the extension before user login, with or without on-demand enabled.
However we see in other posts (1, 2) that a network extension packaged as sysex should automatically start before user login.
Are we missing something? Is it a limitation of PacketTunnelProvider?
Thanks
Regarding the on-demand rules, I was curious why your rules weren’t working so I talked with the NE team about this. Apparently VPN On Demand is only intended to work when a user is logged in. I can see how that makes sense — this feature originated on iOS — but it means that your setup won’t work reliably.
Yeah, I think that’s an accident of the implementation rather than a deliberate plan.
My advice right now is that you file an enhancement request asking for official support for this setup. Make sure to include details about why you want to do this.
Once you’re done, please post your bug number, just for the record.
As to what you can do right now, does you scutil
command work when you invoke it from a global context? That is, a launchd
daemon running as root? I suspect it might not but, if it does, that’s probably the best workaround.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"