tonic icon indicating copy to clipboard operation
tonic copied to clipboard

Allow server to be created from TCP listener and TLS acceptor

Open 0xAlcibiades opened this issue 2 years ago • 2 comments

Feature Request

Crates

tonic

Motivation

I presently use tonic as a tower service with axum_server and steer in front of it to steer requests for grpc or grpc_web, using a custom tcp listener and tls acceptor.

Proposal

It would be great if the tonic server could take a tls acceptor (I think it already does this), and also a tcp listener (for custom things like proxy protocol or e2e tests using a custom listener) and also support grpc and grpc-web being served by the same server.

Alternatives

using axum_server to serve tonic services.

0xAlcibiades avatar Sep 16 '23 23:09 0xAlcibiades

and also a tcp listener (for custom things like proxy protocol

I would also be interested in understanding how one could integrate parsing the proxy protocol v2 when using axum and expose this information to each request.

AlJohri avatar Apr 01 '24 01:04 AlJohri

and also a tcp listener (for custom things like proxy protocol

I would also be interested in understanding how one could integrate parsing the proxy protocol v2 when using axum and expose this information to each request.

https://github.com/valorem-labs-inc/hyper-server/pull/3

We ended up making the change there to axum_server

0xAlcibiades avatar Apr 01 '24 04:04 0xAlcibiades