-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility to select an interface the UDP Dumper will be bound to #354
Comments
Why would you bind the PCAPdroid udp sender to a specific interface? |
Because in the scenario mentioned the local UDP collector (accessible through Wi-Fi) has no chance to get traffic from the udp sender, most probably it goes to the mobile network (the Android API Reference says: "DatagramSocket () Constructs a datagram socket and binds it to any available port on the local host machine. The socket will be bound to the wildcard address, an IP address chosen by the kernel."). |
This does not make much sense, for outbound UDP datagrams, standard route logic should apply, so if the receiver on the wifi is reachable by your device, then it should be able to receive the datagram. |
Ok, let me clarify using the following detailed example:
Without the proposed feature the UDP sender can't "reach" the UDP collector because traffic gets routed to seth_lte0. Here is the log from the phone:
A similar Android issue is described here https://www.reddit.com/r/HomeNetworking/comments/r0sruo/android_ignores_routing_table_uses_phone_data/ When it comes to the changes I made to solve my issue, they are rather a hack than a proper implementation of the feature, but please have a look |
Ok, this behavior is described in https://android-developers.googleblog.com/2016/07/connecting-your-app-to-wi-fi-device.html , so routes will not be inserted if it has no internet. A network selection combobox could be added to the UI to specify on which network to call bindSocket. |
No, I have not evaluated the HTTP server dump mode because I didn't notice it could be used for real-time monitoring as well. Thanks for pointing this option out. I'm sure it will work for the case described. |
Use case:
Using the UDP Dumper we'd like to have a look at traffic between an application and its server when the application is connected to Internet through a mobile network. The target device is also connected to a local network using Wi-Fi (no access to Internet through Wi-Fi though). The UDP collector is running on a local machine in the same local network. It's not so complex to change the code and let a user select an interface the UDP Dumper has to be bound to, e.g.
The text was updated successfully, but these errors were encountered: