Camel HTTP Producer Proxy Settings
Configure the Camel HTTP producer's proxy endpoint directly and distinguish it from a CXF conduit or the target service.
For Camel's HTTP component, put the forward proxy on the producer endpoint that makes the outbound request. In Camel 4.18, a RouteBuilder fragment can use:
from("direct:status")
.to("https://service.example.net/status"
+ "?proxyHost=proxy.example.net"
+ "&proxyPort=8080"
+ "&proxyAuthScheme=http");
The service URL remains the destination. For a permitted public-API test without proxy authentication, a candidate from the HTTP proxy list can supply the intermediary host and port. proxyHost and proxyPort identify the intermediary; proxyAuthScheme selects the protocol used to connect to it. An HTTP proxy can carry the HTTPS request through a tunnel.
Use property placeholders for deployment-specific values. If proxy authentication is required, the component exposes separate proxyAuthUsername, proxyAuthPassword and authentication-method options. Service authentication uses different options.
This configuration belongs to camel-http. A CXF conduit configures a CXF client; it does not configure an HTTP producer just because the route also contains SOAP-related components. Similarly, a ProducerTemplate dispatches to the endpoint and does not replace that endpoint's transport configuration.
Component-level settings can provide shared defaults. Endpoint-level settings keep a particular route explicit.