-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: use proxy from environment #2316
Conversation
Code Climate has analyzed commit 8235da4 and detected 0 issues on this pull request. View more on Code Climate. |
Hey @calebdoxsey what needs to happen to get this PR approved? Pomerium is an awesome project that we would love to use but not being able to use a proxy is a deal breaker for us. |
internal/authclient/authclient.go
Outdated
@@ -120,6 +120,7 @@ func (client *AuthClient) runOpenBrowser(ctx context.Context, li net.Listener, s | |||
} | |||
|
|||
transport := &http.Transport{ | |||
Proxy: http.ProxyFromEnvironment, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me. I wonder if a broader fix would be to use a Clone'd version of the default http transport http.DefaultTransport
which also has some likely sane default timeouts and settings beyond Proxy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that sounds good to me. You mean something like this right?
transport := http.DefaultTransport.Clone()
transport.TLSClientConfig = client.cfg.tlsConfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep!
@tskinn -- This makes sense to me. Had one suggestion, but otherwise I think we can move forward. |
Thanks @tskinn ! |
Summary
The existing implementation of pomerium-cli does not respect the http proxy env vars so here we add the default http.Transport behavior back with ProxyFromEnvironment.
Related issues
Checklist
improvement
/bug
/ etc)