-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Ignore HTTP_PROXY in reverse tunnels, part 2 #12335
Conversation
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.
Let's please also add test coverage to make sure it does not regress again.
@r0mant Can you take another look at this? |
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.
@atburke The code lgtm in general but I'm having a bit of a hard time understanding in which cases we'll be respecting vs not respecting proxies with these changes. Mostly because these clients are used throughout the code.
Before we merge this, could you please help me clarify my understanding regarding the following:
- In which scenarios the proxy will be respected? When using tsh only?
- In which scenarios the proxy will not be respected? For inter-process communication?
- In which scenarios the proxy was respected prior to your original HTTP_PROXY changes? Never?
@@ -55,6 +55,8 @@ func Connect(ctx context.Context, cfg *Config) (auth.ClientI, error) { | |||
Credentials: []apiclient.Credentials{ | |||
apiclient.LoadTLS(cfg.TLS), | |||
}, | |||
// Deliberately ignore HTTP proxies for backwards compatibility. | |||
IgnoreHTTPProxy: true, |
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.
I'm probably missing something, but I'm still not sure why we need to ignore it in the authclient too. Isn't lib/reversetunnel/resolver enough?
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.
It isn't enough. authclient was also affected by the original HTTP_PROXY change. TestMultiPortNoProxy
doesn't pass unless authclient ignores proxies.
Previously, HTTP_PROXY was only supported (as far as I can tell) for inter-process communication in single-port mode. My original HTTP_PROXY PR added support deliberately for |
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.
Looks alright to me.
Do we have any docs on when exactly this env variable applies? I'm somewhat confused, I imagine it could be pretty confusing for users
We have a docs page for http proxy. I'll update it with the current behavior in a new PR. |
This change disables HTTP_PROXY in a few places that were missed in #11990.
This change disables HTTP_PROXY in a few places that were missed in #11990.
This change disables HTTP_PROXY in a few places that were missed in #11990.
This change disables HTTP_PROXY in a few places that were missed in #11990.
This PR disables HTTP_PROXY in a few places that were missed in #11990.