Please accept my ay apologies. I'd misunderstood the documentation.

I was looking for a reason why my go application's requests aren't being 
sent to the proxy that I've specified using HTTP_PROXY and HTTPS_PROXY. 
When I saw the comment in the documentation I thought I'd found an 
explanation even if I didn't understand the reason for it being that way.

So now I'm left with my original problem: I have HTTP_PROXY set to 
http://localhost:8888 and HTTPS_PROXY set to https://localhost:8888. I also 
have a proxy (Fiddler) running on localhost:8888 but requests from my 
application appear to go direct, bypassing the proxy.

I'm perplexed :(

On Tuesday, 13 April 2021 at 19:17:10 UTC+1 wagner riffel wrote:

> On Tue Apr 13, 2021 at 2:14 PM -03, Orson Cart wrote:
> > Can anyone explain the reasoning behind this? It rather interferes with
> > debugging traffic using a local proxy like Fiddler.
> >
>
> My guess here it's for preventing the remote from tricking the proxy to
> make request to internal services that couldn't be reached otherwise.
>
> > I've seen suggestions to define an alternative hostname in /etc/hosts
> > but as far as I can tell this doesn't work either.
> >
>
> The code you linked doesn't seen to try that hard to block loopback
> requests, I do think that an /etc/hosts entry to 127.0.0.1 should
> bypass the proxy, if not I don't see any other way around other than
> implementing the RoundTripper yourself, which shouldn't be hard for
> such simple use.
>
> --wagner
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ac6c1bae-2153-41b3-9037-110fc0eb12cfn%40googlegroups.com.

Reply via email to