ProxymanApp / Proxyman

Modern. Native. Delightful Web Debugging Proxy for macOS, iOS, and Android ⚡️
https://proxyman.io
5.63k stars 187 forks source link

Proxyman not capturing traffic from command line apps #875

Open paul-go opened 3 years ago

paul-go commented 3 years ago

Proxyman version? (Ex. Proxyman 1.4.3)

Proxyman 2.24.0

macOS Version? (Ex. mac 10.14)

macOS 10.13

Steps to reproduce

I'm not sure if this is a supported feature.

I'm trying to inspect the HTTPS traffic going through the wire that is being originated by the restic command line tool, but the traffic doesn't appear to be capturing in the side bar. I have HTTPS traffic being captured that is originating from other desktop apps installed install on this machine.

I even have the domains of interest both "Pinned", however, the only requests that are showing up are the ones that originated from CyberDuck:

Screen Shot 2021-05-03 at 2 02 43 PM

I also tried to add the restic executable file directly as an app ... it doesn't appear that this is supported (the option to choose this file is disabled in the open file dialog)

NghiaTranUIT commented 3 years ago

Hi @paul-go You could not see the HTTP traffic from the command line app because their traffic doesn't go through the HTTP/HTTPS Proxyman Proxy Server (at localhost port 9090).

To illustrate, by default, curl doesn't send a request to Proxyman unless we explicitly config it with --proxy http://localhost:9090

curl 'https://httpbin.org/get?data=123' \
-H 'Accept: */*' \
-H 'User-Agent: insomnia/2021.3.0' \
-H 'Host: httpbin.org' \
--proxy http://localhost:9090

To fix your problem, we have to know what CLI you're using? Then let see if this CLI supports HTTP/HTTPS Proxy config.

NghiaTranUIT commented 3 years ago

One solution I can find to force all CLI apps that go through HTTP/HTTP Proxy is using http_proxy/https_proxy flag

export http_proxy=127.0.0.1:9090
export https_proxy=127.0.0.1:9090

Ref: https://www.serverlab.ca/tutorials/osx/administration-osx/configuring-a-network-proxy-for-osx/

@paul-go Please try it and let me know if it works for you 😄