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

Auto detection of proxy settings #372

Merged
merged 2 commits into from
Feb 19, 2025
Merged

Auto detection of proxy settings #372

merged 2 commits into from
Feb 19, 2025

Conversation

breedloj
Copy link
Contributor

@breedloj breedloj commented Feb 17, 2025

Issue #, if available:
#355

Description of changes:
Adds support for auto detecting proxy configuration from the operating environment. Proxy configuration set in the plugin preference pane will always take precedence, otherwise resolution will query (in order):

  • Environment variables (http_proxy, https_proxy)
  • Java system properties (http.proxyHost, http.proxyPort, etc, as defined here)
  • Operating system level proxy configuration, including PAC auto detected config
  • (Windows only) IE proxy configuration. This is used in some legacy environments.

This change also fixes a potentially severe bug for the plugin's HTTP clients where providing a custom CA cert would eliminate any existing certificates in the trust store. The intention of this logic is to additively inject the provided CA cert to the store.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

if (!StringUtils.isEmpty(prefValue)) {
httpsProxy = prefValue;
}
public static String getHttpsProxyUrlForEndpoint(final String endpointUrl) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does making this an Optional make sense? It would make it explicit to the user that the String could be null

@breedloj breedloj force-pushed the breedloj/autoDetectProxy branch 2 times, most recently from 6a5edb8 to 377d74c Compare February 19, 2025 20:46
@breedloj breedloj force-pushed the breedloj/autoDetectProxy branch from 377d74c to a029172 Compare February 19, 2025 20:56
@breedloj breedloj merged commit 924c905 into main Feb 19, 2025
1 check passed
@breedloj breedloj deleted the breedloj/autoDetectProxy branch February 19, 2025 22:19
taldekar added a commit that referenced this pull request Feb 20, 2025
* Fix line height for chat input box

* Auto detection of proxy settings (#372)

---------

Co-authored-by: Ishan Taldekar <[email protected]>
@taldekar taldekar restored the breedloj/autoDetectProxy branch February 25, 2025 17:31
@taldekar taldekar deleted the breedloj/autoDetectProxy branch February 25, 2025 17:35
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.

2 participants