-
Notifications
You must be signed in to change notification settings - Fork 38
Enforce proxy in UrlConnectionHttpClient #2650
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
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a proxy enforcement mechanism in the UrlConnectionHttpClient for HTTP requests by selecting a proxy via the system ProxySelector and falling back to system properties if necessary.
- Enforces the use of a proxy when creating HttpURLConnection.
- Adds an overloaded method in HttpUrlConnectionFactory to support proxy parameters.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
common4j/src/main/com/microsoft/identity/common/java/net/UrlConnectionHttpClient.java | Introduces proxy selection logic and updates connection creation. |
common4j/src/main/com/microsoft/identity/common/java/net/HttpUrlConnectionFactory.java | Adds an overload to create a HttpURLConnection with a specified proxy. |
common4j/src/main/com/microsoft/identity/common/java/net/UrlConnectionHttpClient.java
Outdated
Show resolved
Hide resolved
common4j/src/main/com/microsoft/identity/common/java/net/UrlConnectionHttpClient.java
Outdated
Show resolved
Hide resolved
@microsoft-github-policy-service agree |
This PR should resolve this issue where the proxy currently isn't enforced #2297
The code is currently untested, im using it as a reference to see if you guys would accept a solution like this if it were to be tested.