-
Notifications
You must be signed in to change notification settings - Fork 68
feature: Add support for HTTP_PROXY, HTTPS_PROXY, and NO_PROXY #1260
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
Open
peterguy
wants to merge
39
commits into
main
Choose a base branch
from
peterguy/support-http_proxy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+521
−51
Open
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
5a9edbd
fix formatting and error messages
peterguy 97bdbf8
add function to read HTTP_PROXY/HTTPS_PROXY/NO_PROXY environment vari…
peterguy 3c71522
use new function to read proxy settings from environment, preferring …
peterguy d21a313
use http.Request instead of manually building the request, and use Re…
peterguy ed21062
commit to a buffered reader for the proxy connection so we avoid nast…
peterguy dd413b3
clone the transport TLS config instead of creating a new one, and mak…
peterguy 7cc9551
fix some comments
peterguy f62d4c0
whoops, forgot to commit the io import
peterguy 17e380c
dial the proxy, ensuring http/1.1 instead of http/2 for TLS-enabled p…
peterguy d865e1e
add proxy tests
peterguy ab4a4a8
change name of test to match production method
peterguy 0b64f5e
add 10ms delay to test proxy server startup to try to fix ubuntu tests
peterguy fafbc33
go-lint.sh
peterguy 87bcd33
wait for test proxy to startup
peterguy 7dc0f3c
go-lint.sh
peterguy 0eccb9e
parse the endpoint into a URL up front, and gather the proxy from the…
peterguy 5c25857
use the parsed endpoint url and consolidate proxy handling because th…
peterguy 87bfdc5
fix proxyDialAddr and add more tests for it
peterguy fc75fbe
add EndpointURL to the tests and other places that should use it inst…
peterguy 14482ff
use the client to connect to the API instead of http.DefaultClient so…
peterguy e93546c
restore unintentional whitespace changes
peterguy c822ace
undo changes to search_jobs - do those changes in another PR
peterguy 6195a34
clarify comments and direct all proxy usage to the custom dialer
peterguy f229e0e
add a mutex for the buffered reader to match the concurency behavior …
peterguy 4a0f274
close the connection if the TLS handshake errors
peterguy 02e81ce
refactor to use httptest package
peterguy 96c4fec
rename functions and address possible leaks
peterguy 5092a82
check I/O errors; use resp.ProtoMajor instead of strings
peterguy 493fe9f
add test to confirm that closing the connection on handshake error (`…
peterguy 15ad45c
fmt.Errorf --> errors.Newf
peterguy d486976
add test for https connection rejection - ensure correct error handli…
peterguy af1263b
add retry for test that is flaky on CI, probably due to resource cont…
peterguy 45a8725
another try at addressing CI test errors
peterguy 29d9b97
clean up proxy and remove buffered reader - don't actually need it
peterguy 7495578
clean up and refactor tests
peterguy 6520ac4
refactor buildTransport to match incoming changes
peterguy 8f016c5
Merge branch 'main' into peterguy/support-http_proxy
peterguy 7119ea9
fix error capitalization
peterguy 96980e4
fix typos
peterguy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.