Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

grpc-proxy

> 编程语言
Open source

gRPC proxy is a Go reverse proxy that allows for rich routing of gRPC calls with minimum overhead.

1.0K stars0 likes1 views
WebsiteGitHub

About

gRPC proxy is a Go reverse proxy that allows for rich routing of gRPC calls with minimum overhead.

gRPC Proxy

gRPC Go Proxy server

Project Goal

Build a transparent reverse proxy for gRPC targets that will make it easy to expose gRPC services over the internet. This includes:

  • no needed knowledge of the semantics of requests exchanged in the call (independent rollouts)
  • easy, declarative definition of backends and their mappings to frontends
  • simple round-robin load balancing of inbound requests from a single connection to multiple backends

The project now exists as a proof of concept, with the key piece being the proxy package that is a generic gRPC reverse proxy handler.

Proxy Handler

The package proxy contains a generic gRPC reverse proxy handler that allows a gRPC server to not know about registered handlers or their data types. Please consult the docs, here's an exaple usage.

You can call proxy.NewProxy to create a *grpc.Server that proxies requests.

…

Then you need to register it with a grpc.Server. The server may have other handlers that will be served locally.

go
server := grpc.NewServer(
    grpc.CustomCodec(proxy.Codec()),
    grpc.UnknownServiceHandler(proxy.TransparentHandler(director)))
pb_test.RegisterTestServiceServer(server, &testImpl{})

Testing

To make debugging a bit simpler, there are some helpers.

testservice contains a method TestTestServiceServerImpl which performs a complete test against the reference implementation of the TestServiceServer.

In proxy_test.go, the test framework spins up a TestServiceServer that it tests the proxy against. To make debugging a bit simpler (eg. if the developer needs to step into google.golang.org/grpc methods), this TestServiceServer can be provided by a server by passing -test-backend=addr to go test. A simple, local-only implementation of TestServiceServer exists in testservice/server.

License

grpc-proxy is released under the Apache 2.0 license. See LICENSE.txt.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gogolanggrpcproxy

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言