Skip to content

tcp_proxy: add upstream_connect_trigger to control connection establishment#41696

Merged
agrawroh merged 31 commits intoenvoyproxy:mainfrom
agrawroh:feat-tls-delay
Nov 24, 2025
Merged

tcp_proxy: add upstream_connect_trigger to control connection establishment#41696
agrawroh merged 31 commits intoenvoyproxy:mainfrom
agrawroh:feat-tls-delay

Conversation

@agrawroh
Copy link
Copy Markdown
Member

@agrawroh agrawroh commented Oct 25, 2025

Description

This PR adds a new upstream_connect_trigger in TCP Proxy to control how TCP Proxy establishes connections with upstream. In some use-cases we want to delay the connection until we receive the data or let it complete the TLS handshake which is not possible today.


Commit Message: tcp_proxy: add upstream_connect_trigger to control connection establishment
Additional Description: Adds a new upstream_connect_trigger in TCP Proxy to control how TCP Proxy establishes connections with upstream.
Risk Level: Low
Testing: Added Unit + Integration Tests
Docs Changes: Added
Release Notes: Added

@repokitteh-read-only
Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #41696 was opened by agrawroh.

see: more, trace.

@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @wbpcode
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #41696 was opened by agrawroh.

see: more, trace.

@agrawroh agrawroh force-pushed the feat-tls-delay branch 2 times, most recently from 0c138e9 to 1a61b45 Compare October 25, 2025 10:53
…ection establishment

Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Comment thread api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto Outdated
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
@agrawroh agrawroh marked this pull request as ready for review October 25, 2025 13:37
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
@agrawroh agrawroh changed the title tcp_proxy: add upstream_connection_establishment_mode to control connection establishment tcp_proxy: add upstream_connect_mode to control connection establishment Oct 28, 2025
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Copy link
Copy Markdown
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. And some comments are added to the API. (it's much more powerful than I previous review :))

Comment thread api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto Outdated
Comment thread api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto Outdated
Comment thread api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto Outdated
Comment thread api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto Outdated
@wbpcode
Copy link
Copy Markdown
Member

wbpcode commented Oct 30, 2025

/wait

Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
@agrawroh agrawroh changed the title tcp_proxy: add upstream_connect_mode to control connection establishment tcp_proxy: add upstream_connect_trigger to control connection establishment Oct 30, 2025
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Copy link
Copy Markdown
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

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

/lgtm api

@repokitteh-read-only repokitteh-read-only Bot removed the api label Nov 3, 2025
Copy link
Copy Markdown
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

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

thanks for the update. I read the tcp proxy code again and take a deep check to this PR, I think we may need to discuss this again because I misunderstood something before. And sorry about that.

Comment thread docs/root/configuration/listeners/network_filters/tcp_proxy_filter.rst Outdated
Comment thread docs/root/configuration/listeners/network_filters/tcp_proxy_filter.rst Outdated
Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Comment thread api/envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto Outdated
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Copy link
Copy Markdown
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

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

Thanks for the update. Some more comments are added. :)

Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Comment thread source/common/tcp_proxy/tcp_proxy.cc
Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Comment thread source/common/tcp_proxy/tcp_proxy.cc
Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Copy link
Copy Markdown
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

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

Thanks so much for the update. And sorry for the delayed new comment. 🌹

Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Copy link
Copy Markdown
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

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

Thanks for the update. My last two comments!!!

Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Comment thread source/common/tcp_proxy/tcp_proxy.cc Outdated
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
wbpcode
wbpcode previously approved these changes Nov 24, 2025
Copy link
Copy Markdown
Member

@wbpcode wbpcode left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@agrawroh agrawroh enabled auto-merge (squash) November 24, 2025 09:27
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
@agrawroh agrawroh merged commit db20071 into envoyproxy:main Nov 24, 2025
24 of 25 checks passed
grnmeira pushed a commit to grnmeira/envoy that referenced this pull request Mar 20, 2026
…shment (envoyproxy#41696)

## Description

This PR adds a new `upstream_connect_trigger` in TCP Proxy to control
how TCP Proxy establishes connections with upstream. In some use-cases
we want to delay the connection until we receive the data or let it
complete the TLS handshake which is not possible today.

---

**Commit Message:** tcp_proxy: add upstream_connect_trigger to control
connection establishment
**Additional Description:** Adds a new `upstream_connect_trigger` in TCP
Proxy to control how TCP Proxy establishes connections with upstream.
**Risk Level:** Low
**Testing:** Added Unit + Integration Tests
**Docs Changes:** Added
**Release Notes:** Added

---------

Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
Signed-off-by: Gustavo <grnmeira@gmail.com>
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