I have env variable set for http_proxy, but with another call, I like to bypass proxy and use direct connection to destination server instead.
Is there any way I can do that in Go lang?
Thanks.
I have env variable set for http_proxy, but with another call, I like to bypass proxy and use direct connection to destination server instead.
Is there any way I can do that in Go lang?
Thanks.
As @Volker mentioned, you can either:
RoundTripper instead of the DefaultTransport
DefaultTransport.Proxy to return nil for the request in questionNO_PROXY environment variable