Skip to content
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

update http.RoundTripper used by Auth client #1251

Merged
merged 8 commits into from
Dec 5, 2024

Conversation

atavism
Copy link
Contributor

@atavism atavism commented Dec 4, 2024

No description provided.

rc := webclient.NewRESTClient(&webclient.Opts{
BaseURL: baseURL,
OnBeforeRequest: func(client *resty.Client, req *http.Request) error {
prepareUserRequest(req, userConfig())
return nil
},
HttpClient: httpClient,
HttpClient: &http.Client{
Transport: serialTransport{chained, frt},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This updates the auth client to use an http.Client that first attempts to connect via chained proxies and then falls back to using domain fronting with the custom name above (@jigar-f @hwh33 I'm not sure if we can just use proxied.ChainedThenFronted() here?).
Please let me know if this is correct otherwise feel free to change it to the one we should be using

Copy link
Contributor

@jigar-f jigar-f Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember some work needs to be done on auth API access not sure if that was done or not, Let's wait for @hwh33 on this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I would just use ChainedThenFronted

Copy link
Contributor

@jigar-f jigar-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM but let's wait for @hwh33 feedback on this for auth.

@atavism atavism merged commit fc3a90b into main Dec 5, 2024
1 check passed
@atavism atavism deleted the atavism/update-auth-client branch December 5, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants