Traffic originated at the PacketTunnelProvider [lib-curl]

I've implemented a custom VPN (Packet Tunnel Provider) for macOS.
  1. I'm using lib-curl from the provider. The traffic is not going via the tunnel. Is it possible to pass this traffic to the tunnel?

  2. What should happen if I'll set the 'capture all traffic' flag? Will the traffic created from lib-curl at the provider will reach the tunnel?


I'm using lib-curl from the provider. The traffic is not going via the tunnel. Is it possible to pass this traffic to the tunnel?

I just want to confirm; are you including libcurl interfaces or a custom version of libcurl in your Packet Tunnel Provider, sending traffic via these APIs, and not seeing this traffic pass through the tunnel?

If this is the case, you could look into using an In-Provider networking class like NWTCPConnection. If you are using libcurl for the HTTP stack you could also take a look at the CFMessage APIs, depending on how complicated your requests are.

What should happen if I'll set the 'capture all traffic' flag? Will the traffic created from lib-curl at the provider will reach the tunnel?

If you mean setting the flag for includeAllNetworks on NEVPNProtocol then, yes, all traffic should go through the provider in this instance.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Traffic originated at the PacketTunnelProvider [lib-curl]
 
 
Q