-
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
41
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.
+410
−88
Open
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
fc85a20
fix formatting and error messages
peterguy 55a5d3c
add function to read HTTP_PROXY/HTTPS_PROXY/NO_PROXY environment vari…
peterguy 3098fe7
use new function to read proxy settings from environment, preferring …
peterguy 278a38a
use http.Request instead of manually building the request, and use Re…
peterguy b3395c5
commit to a buffered reader for the proxy connection so we avoid nast…
peterguy b4af75c
clone the transport TLS config instead of creating a new one, and mak…
peterguy 7029f04
fix some comments
peterguy 72d731c
whoops, forgot to commit the io import
peterguy e853afc
dial the proxy, ensuring http/1.1 instead of http/2 for TLS-enabled p…
peterguy bf0fb19
add proxy tests
peterguy b12b686
change name of test to match production method
peterguy 4ea79de
add 10ms delay to test proxy server startup to try to fix ubuntu tests
peterguy 40fbc88
go-lint.sh
peterguy d02861d
wait for test proxy to startup
peterguy 0186637
go-lint.sh
peterguy cf90285
parse the endpoint into a URL up front, and gather the proxy from the…
peterguy c01d0cc
use the parsed endpoint url and consolidate proxy handling because th…
peterguy 1fa4544
fix proxyDialAddr and add more tests for it
peterguy c452276
add EndpointURL to the tests and other places that should use it inst…
peterguy 37fbaa3
use the client to connect to the API instead of http.DefaultClient so…
peterguy c8a912e
restore unintentional whitespace changes
peterguy eeb5eca
undo changes to search_jobs - do those changes in another PR
peterguy 81e1780
clarify comments and direct all proxy usage to the custom dialer
peterguy 469b118
add a mutex for the buffered reader to match the concurency behavior …
peterguy d222127
close the connection if the TLS handshake errors
peterguy 765bc6a
refactor to use httptest package
peterguy cc25440
rename functions and address possible leaks
peterguy 7386ce6
check I/O errors; use resp.ProtoMajor instead of strings
peterguy b5d897c
add test to confirm that closing the connection on handshake error (`…
peterguy c8fe355
fmt.Errorf --> errors.Newf
peterguy 2652bad
add test for https connection rejection - ensure correct error handli…
peterguy 8a9a210
add retry for test that is flaky on CI, probably due to resource cont…
peterguy 332be40
another try at addressing CI test errors
peterguy 97f4d42
clean up proxy and remove buffered reader - don't actually need it
peterguy 30ad910
clean up and refactor tests
peterguy 02244ea
refactor buildTransport to match incoming changes
peterguy f8a746c
fix error capitalization
peterguy b54f2b9
undo capitalization change
peterguy 6a6f97b
fix rebase
peterguy 57b7ea6
remove the custom dialer - turns out it is not actually needed
peterguy b986bac
remove unused function
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.