capnp-rpc-rust
capnp-rpc-rust copied to clipboard
https/tls and proxy support
Hi David, is running capnpn over tls/https (and through a proxy) something thats feasible to bolt on the this project? I'm contemplating sponsoring the development of something like it as we would like to start to use capnp for message passing between out appliances and servers (I think thats a good use-case :-) )
Hi!
capnp-rpc-rust allows you to construct RPC connections over arbitrary futures-enabled input/output streams. It should work to have input_stream and output_stream be layered on top of TLS, perhaps through the tokio-tls crate.
I think that getting Cap'n Proto RPC to work over HTTPS would be more difficult, because Cap'n Proto RPC is a complex stateful protocol that seems difficult to map into a request/response pattern.
Alternatively, if you don't have a need for the fancier object-capability features of Cap'n Proto RPC, you could define your own simple RPC protocol that uses just Cap'n Proto serialization in HTTP requests/responses.