The GRPC HTTP Proxy
- not need modify .proto
- not need generate code before compiler
- install vcpkg
vcpkg install protobuf
vcpkg install nghtt2
vcpkg install brynet --head
- mkdir build & cd build
- cmake ..
Please install protobuf,nghtt2,brynet by hand.
- run your grpc server, listen port:
8888
- run your proxy of cmd:
grpc_proxy.exe 0.0.0.0 8080 127.0.0.1 8888 echo_service.proto
- use
curl -v -XPOST http://localhost:8080/sofa.pbrpc.test.EchoServer.Echo -d {"message":"hello"}
- Dont't create new connection to grpc server when every client enter.
- Use some internal HTTP API for control proxy server, eg compiler .proto from client runtime. even for reload .proto.