proxy-wasm / proxy-wasm-cpp-sdk

WebAssembly for Proxies (C++ SDK)
Apache License 2.0
140 stars 68 forks source link

Can I transfrom http request into tcp on HTTP Filter #125

Open orangetangerine opened 3 years ago

orangetangerine commented 3 years ago

Can I transfrom http request into tcp on HTTP Filter

Description: We have an old RPC framework running on production, with a self-designed RPC protocol on TCP. And I've made a transformer to turn gRPC request onto this private RPC request, so that these old services can run in Kubernetes, work on L7, and be controlled by Istio-proxy. My question is, can I do this transform by WASM with Istio? If I apply a custom wasm on HTTP Filter, how can I turn gPRC request to TCP bytes(non HTTP format).

By the way, I found ReplaceDownstreamData in Go's APIs (not found in CPP's), but it seems only available in TcpContext, not HttpContext.