Not able to block the facebook,instagram app through packet tunnel

I am working on an app that will reduce the user screen time via blocking some social applications like Facebook, Instagram, youtube, etc.

with help of NEProxySettings.match domains() I am able to block youtube but seems like none of the domain names is working for Facebook and Instagram, for now, I have used the following domain names.

graph.facebook.com m.facebook.com edge-mqtt.facebook.com gateway.facebook.com lookaside.facebook.com scontent.fluh2-1.fna.fbcdn.net scontent.fixc2-2.fna.fbcdn.net web.facebook.com rupload.facebook.com scontent.fixc2-2.fna.fbcdn.net

I am working on an app that will reduce the user screen time via blocking some social applications like Facebook, Instagram, youtube, etc. with help of NEProxySettings.match domains() I am able to block youtube but seems like none of the domain names is working for Facebook and Instagram, for now, I have used the following domain names.

Do not use a packet tunnel provider to implement a network content filter. Packets that are read from NEPacketTunnelFlow are meant to be sent over a tunnel connection to a remote server for injection into a remote network. They are not meant to be dropped or re-injected back into the system. Doing so is a content filter action, as supported by one of the Network Extension Content Filter Providers APIs. On iOS, implement a connection-based content filter using NEFilterDataProvider and NEFilterControlProvider. On macOS, implement a connection-based content filter with NEFilterDataProvider or a packet-based content filter with NEFilterPacketProvider. On macOS, using both providers at the same time is supported.

There are two ways to deploy a content filter on iOS. In a managed environment, use MDM to deploy a content filter to supervised devices. In an unmanaged environment, deploy your content filter as part of a Screen Time app.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com

When I use Content Filter Providers then on the browser its works fine but its not able to stop the mobile apps like youtube or facebook

Where are you trying to perform the block at? Is it in NEFilterDataProvider or NEFilterControlProvider? I would look for device level traffic in NEFilterDataProvider and Safari or web based traffic in NEFilterControlProvider.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Not able to block the facebook,instagram app through packet tunnel
 
 
Q