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

Add automatic support in WebClient for JVM http.proxyHost and related properties #7218

Closed
tjquinno opened this issue Jul 18, 2023 · 6 comments
Assignees
Labels
3.x Issues for 3.x version branch enhancement New feature or request P3 webclient

Comments

@tjquinno
Copy link
Member

Environment Details

  • Helidon Version: 3.x
  • Helidon SE or Helidon MP
  • JDK version:
  • OS:
  • Docker version (if applicable):

Problem Description

The standard Java system properties http.proxyHost, http.proxyPort, and http.nonProxyHosts (and the https counterparts) govern proxy behavior generally, but not in Helidon's web client.

The request is for Helidon to "intelligently" use those settings automatically, if they exist, in preparing web clients. Presumably, if the developer explicitly sets proxy behavior (via code or configuration) for a web client then, for that client, Helidon would ignore the JVM system property settings.

@tjquinno tjquinno added enhancement New feature or request webclient 3.x Issues for 3.x version branch labels Jul 18, 2023
@AshwinPrabhuB
Copy link

AshwinPrabhuB commented Jul 18, 2023

"Java Networking and Proxies" has some general conventions described, which most Java developers be habituated to expect OOTB.

Currently, devs have to fall in line by wiring these standard variables into WebClient configuration via ${http.proxyHost} tokens. So why not make this behavior default, and let devs customize/override it via configuration source precedence patterns?

@romain-grecourt
Copy link
Contributor

romain-grecourt commented Jul 18, 2023

We should support environment variables too (E.g. http[s]_proxy, no_proxy).
The Proxy configuration class should also have a way to turn off the detection from system properties and environement variables. See this file for inspiration: https://github.com/helidon-io/helidon-build-tools/blob/8cd09fb8e285afc438597ad4b347a5f75add434c/common/common/src/main/java/io/helidon/build/common/Proxies.java#L32

@tomas-langer
Copy link
Member

We should already be supporting this through Proxy.ProxyType.SYSTEM - this uses the Java proxy setup and is already in 3.x

@tjquinno
Copy link
Member Author

Tomas, I think the request is that the Proxy.ProxyType.SYSTEM behavior should be the default (unless the developer specifics otherwise, of course) and not require the developer to explicitly choose it, the thought being that Java developers will expect the standard Java system properties to work without taking any further steps.

@tomas-langer
Copy link
Member

Created #7274 for Helidon 4.x

@jbescos
Copy link
Member

jbescos commented Aug 17, 2023

It was merged already

@jbescos jbescos closed this as completed Aug 17, 2023
@m0mus m0mus added this to Backlog Aug 12, 2024
@m0mus m0mus moved this to Closed in Backlog Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Issues for 3.x version branch enhancement New feature or request P3 webclient
Projects
Archived in project
Development

No branches or pull requests

6 participants