Skip to content

transport-grpc ​

gRPC-lite: HTTP/2 streams carrying protobuf messages with bytes, without gRPC's service machinery. A thin wrapper over the HTTP/2 client and server of ours_proto::h2 (the h2 feature of ours-proto) in the form of a gRPC request.

Crateours-mod-transport-grpc, modules/transports/grpc
Binary featuretransport-grpc
Crate featuresnone

requires ​

  • transport — extends its point.
  • The crate calls ours_proto::h2 (not a module): Client(ours_proto::h2::Client, Duration) and Server(ours_proto::h2::Server); the message framing is there too (h2/grpc.rs).

provides ​

  • Provide::Block { block: "transport", key: "grpc" }.
  • Provide::Schema { name: "transport.grpc" } — the fields of V2RayGRPCOptions.

Syntax: gRPC.

Dependencies ​

ours-transport-api, ours-proto (feature h2), ours-api, ours-codec, tokio.

Design ​

The whole module is src/lib.rs: Config (the transport.grpc block), client/server, KIND. The message length limit is ours_transport_api::GRPC_MAX_MESSAGE_LEN.

Tests ​

modules/transports/grpc/tests/transport.rs (uses ours-relay as a dev dependency).

GPL-3.0-or-later