I have been testing a bare-bones Content Filter on an iOS 11.1.2 device where the callbacks of the NEFilterDataProvider just log the properties of the NEFilterFlow. My results have shown that the localEndpoint property of the NEFilterFlow objects in all of the callbacks are (almost) always nil.
Oddly, there are usually one or two flows that _do_ have a non-nil localEndpoint as soon as I start the Chrome app. But every other app that I have tried always shows nil localEndpoints in the NEFilterFlow objects passed to all callbacks. And Chrome also generally has nil localEndpoints after that first flow or two.
The documentation for the NEFilterSocketFlow localEndpoint property states:
NWEndpoint
object containing details about the socket’s local endpoint. This endpoint object may be nil when [NEFilterDataProvider handleNewFlow:]
is invoked; if so, it will be populated upon receiving network data. In such a case, flow filtering may still be performed based on its socket type, socket family, or socket protocol.However, even after data is received on the flow, I still generally see localEndpoints that are nil. Is this a bug?
Note that my issue is not with the remoteEndpoint. The remoteEndpoint is consistently set to valid values. My concern is specifically with the localEndpoint.
--Chris