Skip to content

mitmproxy in 'transparent' mode fails to get host name using 'showhost' option #7214

@Lqm1

Description

@Lqm1

Problem Description

#4739
I am using mitmdump in transparent mode, but all the host names are displayed by IP address, so when I used the showhost option, the host names are displayed for some hosts but not for Instagram app on Android.
This is probably because the Host header is not present.
We need an alternative.

10.8.0.7:55042 <- tcp <- 157.240.209.23:443
10.8.0.7:55042 <- tcp <- 157.240.209.23:443
10.8.0.7:55042 -> tcp -> 157.240.209.23:443
10.8.0.7:55042 -> tcp -> 157.240.209.23:443
10.8.0.7:55042 -> tcp -> 157.240.209.23:443
10.8.0.7:55042 <- tcp <- 157.240.209.23:443
10.8.0.7:55042 <- tcp <- 157.240.209.23:443

image

Steps to reproduce the behavior:

  1. Start Mitmproxy in transparent mode.
  2. Send a request that is missing the Host header.

System Information

Mitmproxy: 10.4.2
Python: 3.10.15
OpenSSL: OpenSSL 3.3.2 3 Sep 2024
Platform: Linux-6.8.0-45-generic-x86_64-with-glibc2.39

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions