I'm trying to build an iOS app that lists all requests that are made from the device, like Charles Proxy
does. Much like Charles, my idea has been to create a Packet Tunnel Provider
and have it setup a local VPN connection without an external VPN server. The traffic would then be internally routed to the packet tunnel, without requiring an external VPN server.
Since Charles Proxy
does so, I know that it is technically possible, but I can't find any information about how to setup a tunnel with an internal VPN connection, instead of using a "real" external VPN server. The only resource people refers to is the SimpleTunnel
Apple sample project, which is a couple years old and written in Swift 3.
I have downloaded the SimpleTunnel
sample code project, created the correct entitlements and can now run the project and create a VPN configuration that gets listed under Settings, but I just can't connect the VPN tunnel. I have tried changing the server address to 127.1.0.0
and to use IKEv2
, but without success. I have also downloaded the source code at https://github.com/lxdcn/NEPacketTunnelVPNDemo but didn't get it to work either.
Does anyone know how to setup an internal VPN server with NetworkExtensions
and have the tunnel use that connection?