Proxy URLs display IP addresses instead of Hostnames
Description
In captured traffic the URL is presented as, e.g., https://142.250.188.238 instead of https://google.com, in contrast to other proxy apps.
It’s possible these TLS handshakes are not actually setting SNI correctly and that Proxyman relies specifically on that to determine the host to display in URLs, unfortunately I don’t think I have an easy way to confirm this myself. It’s also possible that Charles is basically guessing at the correct host based on the Host header in instances such as this, and thus Proxyman’s behavior is more “correct”, but unfortunately makes the UX more difficult. This may be a bug or instead a feature request dependent on the root cause.
Unfortunately given that so much of the featureset for a proxy involves making decisions based on fields related to the canonical “host", being unable to set, e.g. *.example.com as a wildcard to perform operations on the relevant traffic makes things pretty difficult as the number of individual IPs behind the same domain grows.
Steps to Reproduce
There are likely better ways to reproduce this, but:
- Start up an Android Studio Virtual Device (AVD) and set it to proxy connections to Proxyman.
- Interact with things and stock apps for a bit.
- Compare results to the same behavior with, for example, Charles.
If this is insufficient I should be able to provide simpler and more repeatable reproduction steps privately.
Current Behavior
Connections that in Charlies are recorded with URLs using FQDNs are within Proxyman instead recorded as URLs using IP addresses.
Expected Behavior
Charles-like behavior.
Environment
- App version: Version 5.7.0 (50700)
- macOS version: 14.5 (23F79)
Start up an Android Studio Virtual Device (AVD) and set it to proxy connections to Proxyman.
May I ask if you set the Proxy via the Emulator Toolbar or from the Wi-Fi setting in the Setting app?
From what I know, if you set the Proxy via the Toolabar (not Wifi), all traffic will use IP, instead of domains -> Proxyman displays as a IP.
I don't have any solution to fix it because your Android is calling with IPs.
To fix it, I suggest using Auto Script for Android Emulator. You can find it in the Certificate Menu -> Install for Android -> Emulator. It helps you override the proxy, install the certificate in 1 click.
It also fix the IP issue 👍
That may be what’s happening but then I don’t have a good explanation for how other proxies are reporting more “correct” information under the same configuration. Unfortunately under these circumstances I both can’t use a VM without Google Play Store nor easily recompile the app to change the network-security-config entries.
Setting the proxy from within the emulator rather than using the external “toolbar” setting does seem to work fine with Proxyman though. Thanks for the tip!