Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to get underlying socket? #139

Open
VivekSubr opened this issue Jul 21, 2022 · 1 comment
Open

Is it possible to get underlying socket? #139

VivekSubr opened this issue Jul 21, 2022 · 1 comment

Comments

@VivekSubr
Copy link

VivekSubr commented Jul 21, 2022

Hello!

Looking at the doc, looks like you can only write filters at Layer7? Envoy can also proxy tcp connections, and what if someone wants to do stuff with socket options? Is there any way to get the underlying socket for a given request?

Perhaps what I'm looking for is support for https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/network_filters/wasm_filter?

@PiotrSikora
Copy link
Member

You can write HTTP or TCP filters, but you cannot access underlying TCP connection from HTTP filter, since it can carry more than a single request.

For TCP filters, you should override those functions:
https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/blob/master/proxy_wasm_api.h#L455-L459

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

No branches or pull requests

2 participants