Skip to content

Instantly share code, notes, and snippets.

@larryyangsen
Last active August 14, 2018 03:52
Show Gist options
  • Save larryyangsen/3d8efa98bd83b9f1c448a770ad8d21b3 to your computer and use it in GitHub Desktop.
Save larryyangsen/3d8efa98bd83b9f1c448a770ad8d21b3 to your computer and use it in GitHub Desktop.
golang add http proxy, use mitmweb (https://mitmproxy.readthedocs.io/en/v2.0.2/mitmweb.html), mitmweb -p 9999
os.Setenv("HTTP_PROXY", "http://127.0.0.1:9999")
baseURL := "http://google.com"
resp, err := http.Get(baseURL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment