{"id":24767314,"url":"https://github.com/lunarianss/streams","last_synced_at":"2026-05-10T16:06:26.786Z","repository":{"id":237127985,"uuid":"793866934","full_name":"lunarianss/Streams","owner":"lunarianss","description":"Streams is a Go reverse proxy that allows for rich routing of gRPC calls with minimum overhead. ⚡️  Grpc Proxy","archived":false,"fork":false,"pushed_at":"2024-04-30T09:07:02.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T18:52:40.019Z","etag":null,"topics":["go","grpc","grpc-proxy","proxy"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lunarianss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-30T02:46:36.000Z","updated_at":"2024-10-09T13:01:59.000Z","dependencies_parsed_at":"2024-06-19T11:22:22.073Z","dependency_job_id":"e164f981-850d-407b-8637-07cfa891d913","html_url":"https://github.com/lunarianss/Streams","commit_stats":null,"previous_names":["ryan-eng-del/grpc-proxy","lunarianss/streams"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lunarianss/Streams","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarianss%2FStreams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarianss%2FStreams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarianss%2FStreams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarianss%2FStreams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lunarianss","download_url":"https://codeload.github.com/lunarianss/Streams/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarianss%2FStreams/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268675515,"owners_count":24288285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","grpc","grpc-proxy","proxy"],"created_at":"2025-01-29T00:53:05.496Z","updated_at":"2026-05-10T16:06:21.743Z","avatar_url":"https://github.com/lunarianss.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Streams\n\n![icon](icon/stream.svg) Streams is a [Grpc Go](https://github.com/grpc/grpc-go) Proxy server\n\n## Project Goal\n\nBuild a transparent reverse proxy for gRPC targets that will make it easy to expose gRPC services\nover the internet. This includes:\n\n- no needed knowledge of the semantics of requests exchanged in the call (independent rollouts)\n- easy, declarative definition of backends and their mappings to frontends\n\nThe project now exists as a **proof of concept**, with the key piece being the `proxy` package that\nis a generic gRPC reverse proxy handler.\n\n## Import\n\n```go\ngo get -u github.com/Ryan-eng-del/Streams\n```\n\n## Representations\n\nThe original project is from [mwitkow/grpc-proxy](https://github.com/mwitkow/grpc-proxy), mwitkow was a great programmer and i admired him greatly. streams for the original project, adapted to the latest grpc standard and the latest golang version, and for the project's core functions, made a comment description. In addition, all the tests of the project have been passed. Streams project is also used as a dependency package of my gateway project [Forest](https://github.com/Ryan-eng-del/Forest) to provide Grpc proxy.\n\n## Proxy Handler\n\nThe package [`proxy`](proxy/) contains a generic gRPC reverse proxy handler that allows a gRPC server to\nnot know about registered handlers or their data types. Please consult the docs, here's an exaple usage.\n\nDefining a `StreamDirector` that decides where (if at all) to send the request\n\n```go\ndirector = func(ctx context.Context, fullMethodName string) (context.Context, *grpc.ClientConn, error) {\n    // Make sure we never forward internal services.\n    if strings.HasPrefix(fullMethodName, \"/com.example.internal.\") {\n        return nil, nil, status.Errorf(codes.Unimplemented, \"Unknown method\")\n    }\n    md, ok := metadata.FromIncomingContext(ctx)\n    // Copy the inbound metadata explicitly.\n    outCtx, _ := context.WithCancel(ctx)\n    outCtx = metadata.NewOutgoingContext(outCtx, md.Copy())\n    if ok {\n        // Decide on which backend to dial\n        if val, exists := md[\":authority\"]; exists \u0026\u0026 val[0] == \"staging.api.example.com\" {\n            // Make sure we use DialContext so the dialing can be cancelled/time out together with the context.\n            conn, err := grpc.DialContext(ctx, \"api-service.staging.svc.local\",  grpc.WithDefaultCallOptions(grpc.CallContentSubtype(proxy.Name)))\n            return outCtx, conn, err\n        } else if val, exists := md[\":authority\"]; exists \u0026\u0026 val[0] == \"api.example.com\" {\n            conn, err := grpc.DialContext(ctx, \"api-service.prod.svc.local\", grpc.WithDefaultCallOptions(grpc.CallContentSubtype(proxy.Name)))\n            return outCtx, conn, err\n        }\n    }\n    return nil, nil, status.Errorf(codes.Unimplemented, \"Unknown method\")\n}\n```\n\nThen you need to register it with a `grpc.Server`. The server may have other handlers that will be served\nlocally:\n\n```go\nencoding.RegisterCodec(proxy.Codec())\ngrpc.NewServer(grpc.UnknownServiceHandler(proxy.TransparentHandler(director)))\npb_test.RegisterTestServiceServer(server, \u0026testImpl{})\n```\n\n## License\n\n`grpc-proxy` is released under the Apache 2.0 license. See [LICENSE.txt](LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunarianss%2Fstreams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flunarianss%2Fstreams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunarianss%2Fstreams/lists"}