{"id":18066920,"url":"https://github.com/xaionaro-go/grpcproxy","last_synced_at":"2025-04-05T15:13:07.860Z","repository":{"id":260302525,"uuid":"880912329","full_name":"xaionaro-go/grpcproxy","owner":"xaionaro-go","description":"A simple gRPC server and client to (forward) proxy TCP/UDP connections","archived":false,"fork":false,"pushed_at":"2024-11-03T20:58:52.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T11:56:22.301Z","etag":null,"topics":["client","forward-proxy","go","golang","grpc","http","network","proxy","server","tcp","tun","tunnel","udp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xaionaro-go.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-10-30T15:32:53.000Z","updated_at":"2024-11-03T20:58:56.000Z","dependencies_parsed_at":"2024-10-30T16:47:35.360Z","dependency_job_id":null,"html_url":"https://github.com/xaionaro-go/grpcproxy","commit_stats":null,"previous_names":["xaionaro-go/grpcproxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaionaro-go%2Fgrpcproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaionaro-go%2Fgrpcproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaionaro-go%2Fgrpcproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaionaro-go%2Fgrpcproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xaionaro-go","download_url":"https://codeload.github.com/xaionaro-go/grpcproxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353742,"owners_count":20925329,"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","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":["client","forward-proxy","go","golang","grpc","http","network","proxy","server","tcp","tun","tunnel","udp"],"created_at":"2024-10-31T07:05:44.430Z","updated_at":"2025-04-05T15:13:07.840Z","avatar_url":"https://github.com/xaionaro-go.png","language":"Go","readme":"# About\n\n[![Go Reference](https://godoc.org/github.com/xaionaro-go/grpcproxy?status.svg)](https://godoc.org/github.com/xaionaro-go/grpcproxy)\n[![Go Report Card](https://goreportcard.com/badge/github.com/xaionaro-go/grpcproxy?branch=main)](https://goreportcard.com/report/github.com/xaionaro-go/grpcproxy)\n\nThis is a gRPC server and a client that allows to proxy network connections via the server.\n\n# How to use\n\n## Server-side\n\nLet's say you already have a gRPC server written in Go, something like this:\n```go\n\tgrpcServer := grpc.NewServer()\n\tmyFancyService := myfancyservice.New()\n\tmyFancyService_grpc.RegisterMyFancyServiceServer(grpcServer, myFancyService)\n```\n\nTo add the proxy capability you just need to register the proxy service as well:\n```go\nimport \"github.com/xaionaro-go/grpcproxy/grpcproxyserver\"\nimport \"github.com/xaionaro-go/grpcproxy/protobuf/go/proxy_grpc\"\n\n\tgrpcServer := grpc.NewServer()\n\tmyFancyService := myfancyservice.New()\n\tmyfancyservice_grpc.RegisterMyFancyServiceServer(grpcServer, myFancyService)\n\n\tproxyServer := grpcproxyserver.New()\n\tproxy_grpc.RegisterNetworkProxyServer(grpcServer, proxyServer)\n```\n\n## Client-side\n\nOn the client side you may replace a direct connection:\n```go\nconn, err := net.Dial(\"tcp\", addr)\n```\nwith proxied connection:\n```go\nconn, err := grpchttpproxy.NewDialer(myGRPCClient).DialContext(ctx, \"tcp\", addr)\n```\n\nOr if you need to proxy an HTTP request, you may make an HTTP client:\n```go\n\thttpClient := \u0026http.Client{\n\t\tTransport: \u0026http.Transport{\n\t\t\tDialContext: grpchttpproxy.NewDialer(myGRPCClient).DialContext,\n\t\t},\n\t}\n```\nAnd then perform the HTTP requests via this client\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxaionaro-go%2Fgrpcproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxaionaro-go%2Fgrpcproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxaionaro-go%2Fgrpcproxy/lists"}