Friday, 30 December 2016

How to configure Postman Native Client App to use an external proxy

TLDR; to configure Postman native client app to use a proxy start it with command line parameter --proxy-server=host:port

postman.exe --proxy-server=localhost:8888

One of things I like about Postman Chrome App is that, because it uses Chrome, it is really easy to feed through a debug proxy like Fiddler, or Zap, etc. etc.

But since Chrome Apps are going to die and Postman has a native app now, I thought I’d use that.

Uh oh! Where is the proxy setting?

There is a strange little satellite icon for “Proxy Settings” which lets me switch on an inbuilt proxy:

https://www.getpostman.com/docs/capture_native

That might be useful. I might want to send browser traffic to postman to build up a collection. I can’t imagine doing that, but it might be useful.

What about an external proxy?

But I could find no official documentation or support on how to configure an external proxy:

https://www.google.co.uk/search?q=postman+desktop+client+proxy

None.

I found that strange.

Does no-one else need this functionality?

Or perhaps everyone else knows how to configure it, and its really obvious, just not obvious to me.

And the answer is…

And the answer is that since Postman is an electron based application we can use the electron command line switches.

https://github.com/electron/electron/blob/master/docs/api/chrome-command-line-switches.md

Here’s how I do it on Windows.

I have a short cut with the target:

C:\Users\Alan\AppData\Local\Postman\app-4.9.3\Postman.exe --proxy-server=localhost:8888

OR I could go to the postman directory and run the command:

postman.exe --proxy-server=localhost:8888

Hope that helps.

4 comments:

  1. Hey Alan, thanks a bunch for this. You saved my day! Exactly what I was looking for. I had been using Postman as a Chrome app on Windows and Chrome depends on Windows internet connection settings for its proxy so it was a real pain to have to change those settings every time. But with this, I can just limit the proxy use to just Postman and change it any time I want. Awesome man! Thanks again. :-)

    ReplyDelete
    Replies
    1. You're welcome. Thanks for letting me know. Glad it helped :)

      Delete
  2. Thanks this really helped me, as you correctly said this wasn't corrected documented anywhere so great work finding this!

    ReplyDelete