Repository navigation
tcp_proxy: add support to evaluate downstream info at tunnel setting - #18858
Conversation
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
alyssawilk
left a comment
There was a problem hiding this comment.
Nice! just one nit, and mind adding this config to one of the tcp proxy integration tests as well?
/wit
Signed-off-by: Yuchen Dai <[email protected]>
Thank you for the review! A integration test is added and header name and value is verified there |
alyssawilk
left a comment
There was a problem hiding this comment.
Adding Greg for non-google pass
|
Thank you! |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
|
Thank you @lambdai for implementing this |
| @@ -26,6 +26,10 @@ static_resources: | |||
| cluster: "cluster_0" | |||
| tunneling_config: | |||
| hostname: host.com:443 | |||
There was a problem hiding this comment.
@lambdai can we also set this hostname using formatter like %REQUESTED_SERVER_NAME% so that the CONNECT uses SNI as host name? IF not, how can I achieve that with this feature?
There was a problem hiding this comment.
IMO the non-trivial operation should be achieve via the headers_to_add field.
The headers_to_add type is HeaderValueOption. It includes the override option OVERWRITE_IF_EXISTS_OR_ADD and the implementation is on the go
WDTY?
There was a problem hiding this comment.
Yes. But I see this comment which says for host it is not supported
Commit Message:
This allows to generate tcp proxy's upstream CONNECT header values using downstream info.
Examples include modifying the host/:authority headers
Or emulate the proxy protocol via CONNECT as in the test cases.
Use with caution: a RFC in-compliant upstream header can be introduced because stream info may carry arbitrary bytes.
Additional Description:
Risk Level: LOW
Testing:
Docs Changes:
Release Notes:
Fixes #18128