You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by ezekieldas March 19, 2024
I'm testing blocky in an environment which requires all http/https requests to use a forward proxy. I have the following env vars defined on OS:
Yet when I test this in an environment where 80/443 are not blocked, blocky starts just fine:
[2024-03-19 17:31:44] INFO list_cache: import succeeded count=20562 source=http://sysctl.org/cameleon/hosts
[2024-03-19 17:31:45] INFO list_cache: import succeeded count=178085 source=https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
I'm not well versed in Go but is there a library which could be included in the blocky build to support forward proxy?
This shouldn't be hard to support. Go has support for the env proxy variables in the standard library. It's even enabled by default.
We use a custom "HTTP Transport" so we can override the name resolution, and provide the right SNI for DoH/DoT. That has the side effect of disabling the env proxy support.
I'll look at basing our transport on the default one instead of building it from scratch.
The text was updated successfully, but these errors were encountered:
Yep that Prometheus option maps to Go's http.ProxyFromEnvironment, which is what Go uses by default, but was lost in the way we build our HTTP "Transport"/config.
I made a PR with the fix :)
Discussed in #1409
Originally posted by ezekieldas March 19, 2024
I'm testing blocky in an environment which requires all http/https requests to use a forward proxy. I have the following env vars defined on OS:
When I start blocky as a standalone binary, requests against blocklists fail:
Yet when I test this in an environment where 80/443 are not blocked, blocky starts just fine:
I'm not well versed in Go but is there a library which could be included in the blocky build to support forward proxy?
This shouldn't be hard to support. Go has support for the env proxy variables in the standard library. It's even enabled by default.
We use a custom "HTTP Transport" so we can override the name resolution, and provide the right SNI for DoH/DoT. That has the side effect of disabling the env proxy support.
I'll look at basing our transport on the default one instead of building it from scratch.
The text was updated successfully, but these errors were encountered: