Post

Replies

Boosts

Views

Activity

Reply to NEFilterManager and NEDNSProxyManager
UPDATE: I figured out how to set up the target schemes for extensions, but the problem with the init of the NEFilterManager remains. I tried to use com.apple.security.get-task-allow key in entitlements to test it on the device without supervised mode, however, that didn't work. I still receive -[NEFilterManager saveToPreferencesWithCompletionHandler:]_block_invoke_3: failed to save the new configuration: (null) in the console. I'd be grateful to hear if anybody has some thoughts or suggestions about that.
Mar ’24
Reply to NEFilterManager and NEDNSProxyManager
I added a new target for NEFilterControlExtension however if I run main target I still receive the same message: -[NEFilterManager saveToPreferencesWithCompletionHandler:]_block_invoke_3: failed to save the new configuration: (null) I left NEFilterManager without changes. For both NEFilterControlProvider and NEFilterDataProvider return .drop() in handleNewFlow to drop every flow in order to test the POC. Indeed, not sure why but when I run my dns proxy target, it works as expected and I have all the information in debug session but when I run one of the Content Filter Extension targets looks like it's not able to attach Not sure what causes the problem at this point. Would be grateful for any thoughts or suggestions!
Mar ’24
Reply to Unable to start NEContentFilter on iOS
I tried to use configuration profile on the new project so it wasn't the initial project, but it didn't work. I only added two extension targets for Filter Data Provider and Filter Control Provider, and set handleNewFlow in Filter Data Provider to .drop() by default. I am just trying to test the concept of Content Filter, so that I could move on to implementing some custom filtering logic.
Apr ’24
Reply to DNSProxy with configuration profile & MDM
And could you help me understand the work of the Content Filter in the following context. When I use the Network Tools app for testing ping commands for specified domains/IP addresses, the content filter (both socket and browser filtering enabled) is unable to intercept them. Is it the problem of sandbox restrictions? However, if I use DNSProxy with NEDNSManager which I tested before, I can intercept ping of the domains but not IP addresses, which is obvious. However, why is the content filter unable to intercept traffic from the Network Tools app?
Apr ’24
Reply to DNSProxy with configuration profile & MDM
Yes, I was trying to install configuration payload profile via MDM. In this configuration profile I have two payloads (Content Filter and DNS Proxy). Content Filter works as expected, but not the DNS Proxy. That's why I had another post on my profile regarding async operations in Network Extension, as the initial idea of using DNS Proxy with specified resolver didn't work for me.
Apr ’24
Reply to DNSProxy with configuration profile & MDM
So, I removed all existing profiles from the device and added a new payload for DNS Proxy, that is similar to the one I added earlier. After that I created an empty project to test if it's going to work (NEDNSProxyProvider principal class file added to compile sources of the main target), and it worked as expected. DNS Proxy now is displayed as Running in System Settings.
Apr ’24
Reply to DNSProxy with configuration profile & MDM
However, I have another question regarding DNS Proxy. Yesterday, I made it work in my main project with Content Filter and it worked as expected. Today after some testing (no changes were made to the project), the device is not functioning right. All flows are not going through even after removing all the filtering logic. And in safari I receive "Safari could not open the page because the server stopped responding". So I tried to isolate the problem and it seems that DNSProxy is the one that's not working properly, because Content Filter itself works properly. It says running in the System Settings for DNS Proxy and the principal class looks like this: class DNSProxyProvider: NEDNSProxyProvider { override func startProxy(options:[String: Any]? = nil, completionHandler: @escaping (Error?) -> Void) { // Add code here to start the DNS proxy. completionHandler(nil) } override func stopProxy(with reason: NEProviderStopReason, completionHandler: @escaping () -> Void) { // Add code here to stop the DNS proxy. completionHandler() } override func sleep(completionHandler: @escaping () -> Void) { // Add code here to get ready to sleep. completionHandler() } override func wake() { // Add code here to wake up. } override func handleNewFlow(_ flow: NEAppProxyFlow) -> Bool { // Add code here to handle the incoming flow. return true } } But it still wouldn't work. So I tried to run the project that had only DNSProxy with default settings, the same problem there. Not sure what's causing this problem. Would be grateful to hear any thoughts
Apr ’24