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

martian: configure proxy by exported variables only #691

Merged
merged 9 commits into from
Feb 13, 2024

Conversation

mmatczuk
Copy link
Contributor

Refactor Proxy initialization code and remove setters.

Fixes #319

@mmatczuk mmatczuk requested a review from a team as a code owner February 12, 2024 15:28
Removing it as it's not used.
nosigpipe targets only darwin && go1.9, and it's for mobile i.e. running martian on iPhone.
The associated issues are mostly closed, and from 2016/2017.
Proxy can be now configured using exported variables only.
This is copied from http.Server, and we use initOnce pattern instead of constructor.

This allows to avoid multiple overwrites of transport fields and side effects caused by invalid setter call order.
@mmatczuk mmatczuk force-pushed the mmt/martian_connect_refactoring branch from 0f00cd6 to a3dc134 Compare February 12, 2024 15:54
Avoid modifying the passed round-tripper with DialContext and ProxyURL.
@mmatczuk mmatczuk merged commit 0152829 into main Feb 13, 2024
4 checks passed
@mmatczuk mmatczuk deleted the mmt/martian_connect_refactoring branch February 13, 2024 10:46
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.

martian: refactor Set RoundTripper/DialContext API
1 participant