I just had this exact problem, and the decision I made did NOT solve it for me. This is because my environment variable $HTTP_PROXY not been set!
I managed to solve this problem by setting the environment variables specified here: http://www.bonusbits.com/wiki/HowTo:Setup_Charles_Proxy_on_Mac Then, once the variable was set correctly, I didn’t even need to apply custom Transport to my client . He worked with standard transport.
Perhaps because I use a custom shell (zsh), this did not happen automatically. However, the interesting thing is that python would fix Charles Proxy's appearance in the same shell, while Go would not. Updating my .zshrc (or any other shell or profile that you use config) to export the relevant variables.
source share