[GH-ISSUE #175] How to use with command line tools? #172

Open
opened 2026-03-03 19:15:55 +03:00 by kerem · 7 comments
Owner

Originally created by @andrewhavens on GitHub (Jun 12, 2019).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/175

Originally assigned to: @NghiaTranUIT on GitHub.

Which Proxyman version are you using? (Ex. Proxyman 0.5 (200))

Proxyman 1.4.1.1 (1411)

What OS Version are you using? (Ex. mac 10.13)

Mac 10.14.5

Steps to reproduce this issue

Trying to use Proxyman to inspect HTTPS requests being made from a command line tool. Requests weren't being logged automatically, so I manually configured the tool to use Proxyman as the proxy using a URL of http://localhost:9090. However, it is failing on trusting the Proxyman Certificate. The tool allows for specifying a directory of CA certs, but I wasn't sure what directory that would be.

Originally created by @andrewhavens on GitHub (Jun 12, 2019). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/175 Originally assigned to: @NghiaTranUIT on GitHub. ### Which Proxyman version are you using? (Ex. Proxyman 0.5 (200)) Proxyman 1.4.1.1 (1411) ### What OS Version are you using? (Ex. mac 10.13) Mac 10.14.5 ### Steps to reproduce this issue Trying to use Proxyman to inspect HTTPS requests being made from a command line tool. Requests weren't being logged automatically, so I manually configured the tool to use Proxyman as the proxy using a URL of `http://localhost:9090`. However, it is failing on trusting the Proxyman Certificate. The tool allows for specifying a directory of CA certs, but I wasn't sure what directory that would be.
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 13, 2019):

Hey @andrewhavens

  1. curl or some command line tools doesn't often go through Proxyman at port 9090, so we have to enable it explicitly. For example: curl require this param -x http://localhost:9090

  2. Can you help me to answer some questions, so I could investigate what is wrong

  • Have you install and trust Proxyman Certificate in Proxyman yet (Certificate menu -> Install Cert on this mac)?
  • Are you able to incept any request? To make sure Proxyman works, and only has problems with your tool.
  • If you would like to specify the CA. You could find it at ~/.proxyman. All you need are here, if you've installed CA properly.

Let me know if you need some help

<!-- gh-comment-id:501566441 --> @NghiaTranUIT commented on GitHub (Jun 13, 2019): Hey @andrewhavens 1. `curl` or some command line tools doesn't often go through Proxyman at port `9090`, so we have to enable it explicitly. For example: `curl` require this param `-x http://localhost:9090` 2. Can you help me to answer some questions, so I could investigate what is wrong - Have you install and trust Proxyman Certificate in Proxyman yet (Certificate menu -> Install Cert on this mac)? - Are you able to incept any request? To make sure Proxyman works, and only has problems with your tool. - If you would like to specify the CA. You could find it at `~/.proxyman`. All you need are here, if you've installed CA properly. Let me know if you need some help ☕️
Author
Owner

@andrewhavens commented on GitHub (Jun 13, 2019):

Thanks @NghiaTranUIT! I was able to specify the CA file that is located at ~/.proxyman/proxyman-ca.pem and it worked.

<!-- gh-comment-id:501905509 --> @andrewhavens commented on GitHub (Jun 13, 2019): Thanks @NghiaTranUIT! I was able to specify the CA file that is located at `~/.proxyman/proxyman-ca.pem` and it worked.
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 14, 2019):

Glad to hear that 👍

<!-- gh-comment-id:501942714 --> @NghiaTranUIT commented on GitHub (Jun 14, 2019): Glad to hear that 👍
Author
Owner

@psimoneau22 commented on GitHub (Jul 25, 2019):

I have something similar. We have Application code written with C# and dotnet. When using the httpClient in the dotnet framework, requests do not go through the proxy. Is there anything that can be done without explicitly changing the application code's httpClient to use the proxy? On a windows machine using Fiddler, this just automatically works without having to change any application code. I can see all my requests going through the fiddler proxy.

Edit, I might be wrong about windows automatically doing it, but here is what the fiddler docs say https://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/ConfigureDotNETApp

Btw great job so far, keep on going. I use fiddler extensively on windows and I am (and I know many other people who are) looking for the same basic functionality on Mac.

<!-- gh-comment-id:515186188 --> @psimoneau22 commented on GitHub (Jul 25, 2019): I have something similar. We have Application code written with C# and dotnet. When using the httpClient in the dotnet framework, requests do not go through the proxy. Is there anything that can be done without explicitly changing the application code's httpClient to use the proxy? On a windows machine using Fiddler, this just automatically works without having to change any application code. I can see all my requests going through the fiddler proxy. Edit, I might be wrong about windows automatically doing it, but here is what the fiddler docs say https://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/ConfigureDotNETApp Btw great job so far, keep on going. I use fiddler extensively on windows and I am (and I know many other people who are) looking for the same basic functionality on Mac.
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 26, 2019):

Technically, when Proxyman launches, it will automatically override the HTTP/HTTPS Proxy in Network System (You can see in System Preference -> Network -> Wifi -> Advanced -> Proxy). Therefore, all requests are automatically proxying to Proxyman -> Appear on the app.

However, some apps don't respect that rule until we explicitly config in their apps. For instance:

  • curl require -v -x http://localhost:9090
  • Insomnia and Paw requires the Proxy Config in their Preferences
  • Android app required pre-defined config (Screenshot)
    Screen Shot 2019-07-26 at 09 15 40

So, I guess there is two scenarios:

  1. If we open Proxyman, but there is no requests a alls, no Proxy Overridden in Network System => It indicates a bug 🐛
  2. If other requests appear (Open Safari or Chrome) too see, but there is no request from your app => It means that we have to explicitly config the Proxy in your source code. Like Android or even .NET app

@psimoneau22 let me know what situation you're 🌮

Thank you in advance 😄

<!-- gh-comment-id:515282923 --> @NghiaTranUIT commented on GitHub (Jul 26, 2019): Technically, when Proxyman launches, it will automatically override the HTTP/HTTPS Proxy in Network System (You can see in System Preference -> Network -> Wifi -> Advanced -> Proxy). Therefore, all requests are automatically proxying to Proxyman -> Appear on the app. However, some apps don't respect that rule until we explicitly config in their apps. For instance: - `curl` require `-v -x http://localhost:9090` - Insomnia and Paw requires the Proxy Config in their Preferences - Android app required pre-defined config (Screenshot) <img width="550" alt="Screen Shot 2019-07-26 at 09 15 40" src="https://user-images.githubusercontent.com/5878421/61921141-4800c800-af86-11e9-9a02-ce9444603118.png"> So, I guess there is two scenarios: 1. If we open Proxyman, but there is no requests a alls, no Proxy Overridden in Network System => It indicates a bug 🐛 2. If other requests appear (Open Safari or Chrome) too see, but there is no request from your app => It means that we have to explicitly config the Proxy in your source code. Like Android or even .NET app @psimoneau22 let me know what situation you're 🌮 Thank you in advance 😄
Author
Owner

@psimoneau22 commented on GitHub (Aug 2, 2019):

situation #2

I am good, we will just have to add some code to our apps (conditionally) when we want to debug through proxyman. Thank you for your help.

<!-- gh-comment-id:517680281 --> @psimoneau22 commented on GitHub (Aug 2, 2019): situation #2 I am good, we will just have to add some code to our apps (conditionally) when we want to debug through proxyman. Thank you for your help.
Author
Owner

@NghiaTranUIT commented on GitHub (Aug 2, 2019):

Glad to hear that @psimoneau22 👍 🌮 😄

<!-- gh-comment-id:517710277 --> @NghiaTranUIT commented on GitHub (Aug 2, 2019): Glad to hear that @psimoneau22 👍 🌮 😄
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#172
No description provided.