TunnelVision

0001 — Use NEPacketTunnelProvider for on-device capture

Context

We need to observe all of the device’s network traffic on an unmodified iPhone. iOS sandboxes apps and gives no raw access to other apps’ sockets or a promiscuous interface. The only App-Store-shippable mechanism to see device-wide traffic is Apple’s NetworkExtension framework. Its variants:

Decision

Use NEPacketTunnelProvider. It is the only option that delivers full raw IP packets for all traffic, lets us parse at the IP layer, and lets us forward/reinject — exactly what a packet analyzer needs. The tunnel terminates locally (there is no remote VPN server).

Consequences

Alternatives considered