Skip to content

Commit

Permalink
Separate TcpClient/HttpClient proxy documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Violeta Georgieva <[email protected]>
  • Loading branch information
violetagg committed Jan 22, 2025
1 parent b16beb9 commit 4bca96e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/faq.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[[faq.proxy-connect-method]]
== Connection to the proxy cannot be established
include::partial$proxy.adoc[tag=proxy-connect-method]
include::partial$http-client-proxy.adoc[tag=proxy-connect-method]

[[faq.logging-prefix]]
== What is the meaning of the information that is prepended to every log record?
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/http-client.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ include::{examples-dir}/http3/Application.java[lines=18..46]
<1> Configures the client to support only `HTTP/3`
<2> Configures `HTTP/3` settings

include::partial$proxy.adoc[]
include::partial$http-client-proxy.adoc[]

[[metrics]]
== Metrics
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/tcp-client.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ When you need to change this default setting, you can configure the `TCP` client
include::{examples-dir}/sni/Application.java[lines=18..41]
----

include::partial$proxy.adoc[]
include::partial$tcp-client-proxy.adoc[]

[[metrics]]
== Metrics
Expand Down
File renamed without changes.
21 changes: 21 additions & 0 deletions docs/modules/ROOT/partials/tcp-client-proxy.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
== Proxy Support

Reactor Netty supports the proxy functionality provided by Netty and provides a way
to specify `non proxy hosts` through the {javadoc}/reactor/netty/tcp/ProxyProvider.html[`ProxyProvider`] builder.

// tag::proxy-connect-method[]
Netty's HTTP proxy support always uses `CONNECT` method in order to establish a tunnel to the specified proxy regardless of the scheme that is used `http` or `https`.
(More information: https://github.com/netty/netty/issues/10475[Netty enforce HTTP proxy to support HTTP CONNECT method]).
Some proxies might not support `CONNECT` method when the scheme is `http` or might need to be configured in order to support this way of communication.
Sometimes this might be the reason for not being able to connect to the proxy. Consider checking the proxy documentation
whether it supports or needs an additional configuration in order to support `CONNECT` method.
// end::proxy-connect-method[]

The following example uses `ProxyProvider`:

{examples-link}/proxy/Application.java
[%unbreakable]
----
include::{examples-dir}/proxy/Application.java[lines=18..42]
----
<1> Configures the connection establishment timeout to 20 seconds.

0 comments on commit 4bca96e

Please sign in to comment.