I am trying to capture http traffic using pcap4j from an android emulator / ios simulator to a server which is hosted on the same machine. The machine can run either linux / windows or osx.
I tried capturing packets from wireshark first for testing, but it didn't catch any. I guess this is because the emulator uses the loopback interface to talk to the server since they are running on the same machine. Is there any way I can capture the traffic other than making the emulators use a sort of "man in the middle http proxy"?
Thanks.