I\'m creating application based on ToyVPN to capture tcp/udp packets. After i get outgoing packets in my apllication i would like to forward them to original destination. I hav
Apparently tPacketCapture routes the traffice into another interface running on the phone and sends all of this traffic to the internet (this is the same as mobiwol, greyshirts and other apps that use VPNService).
If you run (and understand) ToyVPN, you know that all of the traffic from the phone goes into a server (your computer) in which you configure iptables to send all the traffic to the internet.
If you want to run without a server, yo have to do the same thing on the phone. From another question:
When I look at mobiwol's connection with "adb shell netcfg" it creates a tun0 interface with 10.2.3.4/32 address. It routes all packages to this private network and send to internet.
So basically from your app you will have to configure the phone to act as it's own server.