Hello!
I was wondering why NEPacket's metadata was always nil in a packet tunnel.
In writing a packet tunnel, it could be very interesting to know which app is making the request, not only for some good visualisation and understanding of where traffic is originating from, but also to potentially implement blacklists/whitelists through the VPN.
I am aware of the Per-App VPN as well, but that is not enough because that only includes traffic from a whitelist, and that would also need to be set-up through MDM.
What is a bit puzzling is that the documentation doesn't say when metadata could be set, although the headers actually do, stating:
This property will only be non-nil when the routing method for the NEPacketTunnelProvider is NETunnelProviderRoutingMethodSourceApplication.
However, NEPacket doesn't seem to be used anywhere else other than in a Packet Tunnel, so it is a bit confusing (although I guess it could be used internally by the Per-App VPN mechanism?)
Am I doing something wrong? As in, is there a way for me to be able to get that metadata, that I may not be doing?
If it isn't possible, I assume that'd be worth creating an enhancement request so that it's at least considered for future versions?