'Cant see http traffic using Proxyman when connecting to local machine

I am developing an app with a Node.js API with React Native client using Expo. I am using a IOS emulator to test.

I have my API remotely on NodeChef and locally on my machine for dev.

Im using Proxyman 2.35.4 to watch for traffic. It is woking for the remote API and I can see traffic under the "Apps" then "Expo" then it has the title of my remote endpoint "xx-xxxx-13442.nodechef.com".

But I cannot see traffic when I connect to the local machine API 192.168.1.4:4000. I have looked all thru Apps and Domains folder.

Any ideas why? Malcolm



Solution 1:[1]

By default, all local traffic doesn't go through HTTP Proxy Server (Proxyman), so you might not see any localhost traffic.

To fix it, you might set it as an alias name, which you can add in the /etc/hosts file.

Here is the step:

  1. Open /etc/hosts file
  2. Add the following
127.0.0.1 myserver.local
::1 myserver.local
  1. Save
  2. Try to call myserver.local:4000

Then, Proxyman can capture this localhost traffic.

Ref: https://docs.proxyman.io/troubleshooting/couldnt-see-any-request-from-localhost-server

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nghia Tran