Golang

Capture HTTP/HTTPS from Golang application (net/http, fasthttp, resty, gorequest, req, grequests) with Proxyman

1. New Automatic Solution (macOS v5.17.0 or later) ✅

Proxyman macOS v5.17.0 or later can capture HTTP/HTTPS traffic from Golang with 1-click.

  • 1-click solution: No need to manually set HTTP Proxy config or trust the self-signed certificate.

  • ✅ Support many Go Network Libraries: net/http, fasthttp, resty, gorequest, req, grequests

How to use:

  1. Open Proxyman -> Setup Menu -> Automatic Setup

  2. Select your favorite Terminal -> Click on the "Open New Terminal" button

  3. Accept the Apple Script permission prompt if needed

Open Pre-configured Terminal to intercept GO network https
  1. The New Terminal app is launched -> You can start your Golang Backend Server, or Run scripts => Proxyman automatically captures all traffic.

  2. For example:

  1. Proxyman captures all internal HTTP/HTTPS from go, including net/http

capture and intercept HTTPS traffic from net/http go
  • Proxyman can't capture any HTTP/HTTPS traffic from the Golang Server.

  • The reason is that some network libraries (such as net/http) won't respect the System HTTP Proxy, so no traffic goes through the Proxyman app.

2.1 Solution

net/http

  1. Config Proxy to Proxyman, by default, it's at IP = localhost, port 9090

  2. Tell the Transport to trust Proxyman self-signed certificate. Otherwise, you will get an SSL Error because net/http rejects.

Last updated