Search code examples
androidubuntuproxycharles-proxy

Charles Proxy Issue on Ubuntu


I am trying to do a debug session on my App (Android) by monitoring the outbound/inbound HTTP traffic.

I have followed these steps for the setup,

  • Made sure that my phone and laptop are in same network.
  • My laptop runs Ubuntu. So, I took my laptop's IP address from ifconfig. Let's say it was 172.x.x.x.
  • Configured this IP as the Proxy IP in my mobile, with port 8888.
  • Then, finally, having Charles Application running, I was hoping that my HTTP traffic would get routed via Charles Application on my laptop and I would be able to see the URLs referred.

Issues,

  • I cannot see my traffic in Charles Proxy application.
  • When I look into Help -> Local IP Address, I see that the IP is 127.0.0.1 and not 172.x.x.x.
  • But in my friend's laptop, who also has same setup, we see 172.x.x.x as the Local IP Address.

What am I doing wrong here? Does /etc/hosts affect this setup in anyway?


Solution

  • I have found couple of solutions for this. Both will work -

    Note down your actual IP address from the IFConfig.

    enter image description here

    My actual IP here is 172.16.16.22.

    1. In your mobile wifi's proxy connection, enter this above IP address and 8888 as port value. You will start seeing traffic in the charle's proxy application.

    2. If you are in office WIFI, it is probable that VPN has some issue. In such cases, connect to the VPN from the VPN software provided to you by your office. This will follow same procedure as you would connect to your office network (VPN) from your Home WIFI.