[WIP] AWS SDK Cross Version Compatability: env-var http_proxy
& https_proxy
support
#4165
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.
Motivation and Context
note: I'm opening this early because as far as I can tell it requires changing the public API, but I'm opening to see if others have ideas, or how we can handle this.
fixes #2958
The goal of this is to allow like many other SDKs (including aws-sdk-java v1) support for specifying proxies through environment variables. Using
http_proxy
&https_proxy
for environment variables.http_proxy
will be used for connections to HTTP sites, andhttps_proxy
for HTTPS sites.While making this change, I also noticed a bug in how we were selecting the
http.proxyHost
&https.proxyHost
System Properties. I've gotten them to follow: https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html correctly now. Before we weren't passing the scheme in and only selecting based on explicit configuration (which you can still do, and doesn't break)!I've changed all the HTTP clients that are in the source tree.
Modifications
http
&https
proxies without manual configuration, or multiple clients at all.Testing
Types of changes
Checklist
mvn install
succeedsscripts/new-change
script and following the instructions. Commit the new file created by the script in.changes/next-release
with your changes.License