Post

Replies

Boosts

Views

Activity

Reply to Start NetworkExtension automatically at system boot
As far as I understand, once loaded and user approved, your network extension will be started automatically on the next restart (which was not the case with kernel extensions loaded manually). The issue is actually more with the companion app/process if this is a Mac App Store solution. For the companion app/process to be started at boot time, you would need to use a launchd daemon. And launchd daemons are persona non grata in the MAS AFAIK.
Jan ’21
Reply to Network extension - C APIs?
I don't really see "conversion" C issues with packet filter since basically we are just provided with a bytes buffer. I'm more interested by the Filter Packet case. For instance, in Ob-C, we have NEFilterDataProvider which has those entry points: (NEFilterNewFlowVerdict *)handleNewFlow:(NEFilterFlow *)inFlow; (NEFilterDataVerdict *)handleInboundDataFromFlow:(NEFilterFlow *)inFlow readBytesStartOffset:(NSUInteger)offset readBytes:(NSData *)readBytes; From the NEFilterFlow, you, AFAIK, can only get a NWEndpoint. So I'm wondering if there is a "raw" C-equivalent for NEFilterDataProvider.
Oct ’20
Reply to Network extension - C APIs?
OK but are there entry points for the Network framework’s C "types" for a filter packet provider or a filter data provider? I see only the Obj-C API in the Network Extension framework and there are no public ways to "convert" a NW Obj-C "type" to a NW "C" type. I'm looking for the ease of Obj-C and, when needed, the speed of C.
Oct ’20
Reply to NEFilterConfigurationDidChangeNotification not being sent: is this the expected behavior?
Problem is still there in 10.15.7 and 11.0 beta 9. I thought I could work around this issue by polling the enabled state of the NEFilterManager but it turns out that, if the Network Extension has been removed manually from the Network Pref pane list, when you try to reload the Network Extension, the enabled state is set to YES before the Allow dialog is validated.
Oct ’20
Reply to NEFilterConfigurationDidChangeNotification not being sent: is this the expected behavior?
The background process of the Network Extension is still running. The flows are not processed anymore. I can't help thinking that the management of Network Extensions is unreliable in Catalina and Big Sur. For the record, even the Network Preference Pane does not report correctly the changing state of the Network Extension: Make a network extension inactive (+ Apply). => It's correctly displayed as "Not running". Re-enable the network extension from the embedding app. Qui the embedding application since you will never get the notification. Wait. Sometimes, but rarely, the Network Extension will switch back to the "Running" state in the Network Pref Pane. Most of the time, you have to quit System Preferences (1) and then reopen System Preferences for the Network Extension state to be displayed as "Running". [1] switching to another Pref pane and then back to Network is not enough.
Sep ’20
Reply to NEFilterManager > enabled property very worrying documentation
Thanks for the answers. On both platforms, attempting to enable a content filter configuration beyond the limit will fail.  Regarding iOS (even though I don't care at all about it), the documentation in the header file says that setting this property "will disable filter configurations of other apps". So this does match what you're writing. To ensure performance on the system and to try and separate filtering conflicts as much as possible. IMHO, this will create technical support nightmares for 3rd party developers.
Sep ’20