Skip to content

HttpClient: introduce a connection timeout in ProxyOptions#5650

Merged
tsegismont merged 2 commits intoeclipse-vertx:masterfrom
tsegismont:issue/5634
Jul 21, 2025
Merged

HttpClient: introduce a connection timeout in ProxyOptions#5650
tsegismont merged 2 commits intoeclipse-vertx:masterfrom
tsegismont:issue/5634

Conversation

@tsegismont
Copy link
Member

See #5634

In Netty's ProxyHandler, a default timeout of 10 seconds is set for the connection to be established successfully.

Successfully means slightly different things, depending on the proxy type:

  • for an HTTP proxy, it means the LastHttpContent message of the proxy response to the CONNECT request has been received, and the status code is 200
  • for a SOCKS proxy, it means the SOCKS handshake ended with the SUCCESS status.

Sometimes, users have to deal with external servers behind their proxy that they don't control and that are slow to establish the connection. In such cases, it is required to increase the ProxyHandler timeout.

@tsegismont
Copy link
Member Author

@vietj PTAL

See eclipse-vertx#5634

In Netty's ProxyHandler, a default timeout of 10 seconds is set for the connection to be established successfully.

Successfully means slightly different things, depending on the proxy type:

- for an HTTP proxy, it means the LastHttpContent message of the proxy response to the CONNECT request has been received, and the status code is 200
- for a SOCKS proxy, it means the SOCKS handshake ended with the SUCCESS status.

Sometimes, users have to deal with external servers behind their proxy that they don't control and that are slow to establish the connection.
In such cases, it is required to increase the ProxyHandler timeout.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
@vietj vietj added this to the 5.1.0 milestone Jul 21, 2025
@tsegismont tsegismont merged commit 12a0fd3 into eclipse-vertx:master Jul 21, 2025
12 of 13 checks passed
@tsegismont tsegismont deleted the issue/5634 branch July 21, 2025 09:50
tsegismont added a commit to tsegismont/vert.x that referenced this pull request Jul 21, 2025
…ertx#5650)

* HttpClient: introduce a connection timeout in ProxyOptions

See eclipse-vertx#5634

In Netty's ProxyHandler, a default timeout of 10 seconds is set for the connection to be established successfully.

Successfully means slightly different things, depending on the proxy type:

- for an HTTP proxy, it means the LastHttpContent message of the proxy response to the CONNECT request has been received, and the status code is 200
- for a SOCKS proxy, it means the SOCKS handshake ended with the SUCCESS status.

Sometimes, users have to deal with external servers behind their proxy that they don't control and that are slow to establish the connection.
In such cases, it is required to increase the ProxyHandler timeout.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>

* Use java.time.Duration for ProxyOptions connection timeout

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>

---------

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
tsegismont added a commit to tsegismont/vert.x that referenced this pull request Jul 21, 2025
Backported from eclipse-vertx#5650

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
tsegismont added a commit to tsegismont/vert.x that referenced this pull request Jul 21, 2025
…ertx#5650)

* HttpClient: introduce a connection timeout in ProxyOptions

See eclipse-vertx#5634

In Netty's ProxyHandler, a default timeout of 10 seconds is set for the connection to be established successfully.

Successfully means slightly different things, depending on the proxy type:

- for an HTTP proxy, it means the LastHttpContent message of the proxy response to the CONNECT request has been received, and the status code is 200
- for a SOCKS proxy, it means the SOCKS handshake ended with the SUCCESS status.

Sometimes, users have to deal with external servers behind their proxy that they don't control and that are slow to establish the connection.
In such cases, it is required to increase the ProxyHandler timeout.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>

* Use java.time.Duration for ProxyOptions connection timeout

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>

---------

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
tsegismont added a commit to tsegismont/vert.x that referenced this pull request Jul 21, 2025
…ertx#5650)

* HttpClient: introduce a connection timeout in ProxyOptions

See eclipse-vertx#5634

In Netty's ProxyHandler, a default timeout of 10 seconds is set for the connection to be established successfully.

Successfully means slightly different things, depending on the proxy type:

- for an HTTP proxy, it means the LastHttpContent message of the proxy response to the CONNECT request has been received, and the status code is 200
- for a SOCKS proxy, it means the SOCKS handshake ended with the SUCCESS status.

Sometimes, users have to deal with external servers behind their proxy that they don't control and that are slow to establish the connection.
In such cases, it is required to increase the ProxyHandler timeout.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>

* Use java.time.Duration for ProxyOptions connection timeout

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>

---------

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
tsegismont added a commit that referenced this pull request Jul 24, 2025
…5654)

* HttpClient: introduce a connection timeout in ProxyOptions

See #5634

In Netty's ProxyHandler, a default timeout of 10 seconds is set for the connection to be established successfully.

Successfully means slightly different things, depending on the proxy type:

- for an HTTP proxy, it means the LastHttpContent message of the proxy response to the CONNECT request has been received, and the status code is 200
- for a SOCKS proxy, it means the SOCKS handshake ended with the SUCCESS status.

Sometimes, users have to deal with external servers behind their proxy that they don't control and that are slow to establish the connection.
In such cases, it is required to increase the ProxyHandler timeout.



* Use java.time.Duration for ProxyOptions connection timeout



---------

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
tsegismont added a commit that referenced this pull request Jul 24, 2025
…5655)

* HttpClient: introduce a connection timeout in ProxyOptions

See #5634

In Netty's ProxyHandler, a default timeout of 10 seconds is set for the connection to be established successfully.

Successfully means slightly different things, depending on the proxy type:

- for an HTTP proxy, it means the LastHttpContent message of the proxy response to the CONNECT request has been received, and the status code is 200
- for a SOCKS proxy, it means the SOCKS handshake ended with the SUCCESS status.

Sometimes, users have to deal with external servers behind their proxy that they don't control and that are slow to establish the connection.
In such cases, it is required to increase the ProxyHandler timeout.



* Use java.time.Duration for ProxyOptions connection timeout



---------

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
@vietj vietj mentioned this pull request Feb 8, 2026
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