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

Add HTTP Proxy lookup function support #94

Merged
merged 9 commits into from
Oct 16, 2024

Conversation

ax-esuedmeier
Copy link
Contributor

Added a proxy lookup function to the centrifuge client to enable customizations of proxies vs relying on the default http.ProxyFromEnvironment functionality.

@@ -99,6 +99,7 @@ func newClient(endpoint string, isProtobuf bool, config Config) *Client {
if config.Name == "" {
config.Name = "go"
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also set config.Proxy to http.ProxyFromEnvironment if it is nil, to maintain backwards compatible behaviour? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, yes to maintain backwards compatibility. Lemme make this change. This would mean that it would be impossible to disable proxies, but 🤷 that doesn't seem to be a complaint

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated the default to http.ProxyFromEnvironment and updated the docs a bit in. 5a720a3

ax-esuedmeier and others added 2 commits October 15, 2024 09:50
Update the default value for `Proxy` configs so that they default to `http.ProxyFromEnvironment` instead of no proxy.
Default the proxy to maintain backwards compatibility
@FZambia
Copy link
Member

FZambia commented Oct 16, 2024

Hello @ax-esuedmeier and @C-Pro

Cool, many thanks!

@FZambia FZambia merged commit 345753d into centrifugal:master Oct 16, 2024
3 checks passed
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.

4 participants