grpc-http1: A gRPC via HTTP/1 Enabling Library for Go

Overview

grpc-http1: A gRPC via HTTP/1 Enabling Library for Go

This library enables using all the functionality of a gRPC server even if it is exposed behind a reverse proxy which does not support HTTP/2, or only supports it for clients (such as Amazon's ALB). This is accomplished via either adaptive downgrading to the gRPC-Web response format or utilizing WebSockets.

For a high-level overview, see this Medium post about the gRPC-Web downgrade option and this Medium post about the gRPC-WebSocket option.

Connection Compatibility Overview

The following table shows what can be expected when a client/server instrumented with the capability offered by this library compared to an unmodified gRPC client/server, both when accessing it directly and when accessing it via a reverse proxy not supporting HTTP/2.

Plain Old gRPC Server HTTP/1 Downgrading gRPC Server
direct behind reverse proxy direct behind reverse proxy
Plain Old gRPC Client
gRPC-Web downgrade client mode ()
gRPC-WebSocket client mode

The () for the gRPC-Web downgrading client indicates a subset of gRPC calls will be possible, but not all. These include all calls that do not rely on client-side streaming (i.e., all unary and server-streaming calls).

As you can see, when using the client in gRPC-Web downgrade mode, it is possible to instrument the client or the server without any (functional) regressions - there may be a small but fairly negligible performance penalty. This means rolling this feature out to your clients and servers does not need to happen in a strictly synchronous fashion. However, you will only be able to work with a server behind an HTTP/2-incompatible reverse proxy if both the client and the server have been instrumented via this library. To use the client in gRPC-WebSocket mode, both the client and server must be instrumented via this library.

Usage

This library has the canonical import path golang.stackrox.io/grpc-http1. It fully supports Go modules and requires Go version 1.13+ to be built and used. To add it as a dependency in your current project, run go get golang.stackrox.io/grpc-http1.

Server-side

For using this library on the server-side, you'll need to bypass the regular (*grpc.Server).Serve method and instead use the ServeHTTP method of the *grpc.Server object -- it is experimental, but we found it to be fairly stable and reliable.

The only exported function in the golang.grpc.io/grpc-http1/server package is CreateDowngradingHandler, which returns a http.Handler that can be served by a Go HTTP server. It is crucial this server is configured to support HTTP/2; otherwise, your clients using the vanilla gRPC client will no longer be able to talk to it. You can find an example of how to do so in the _integration-tests/ directory.

Client-Side

For connecting to a gRPC server via a client-side proxy, use the ConnectViaProxy function exported from the golang.grpc.io/grpc-http1/client package. This function has the following signature:

func ConnectViaProxy(ctx context.Context, endpoint string, tlsClientConf *tls.Config, opts ...ConnectOption) (*grpc.ClientConn, error)

The first two arguments are the same as for grpc.DialContext. The third argument specifies the TLS client config to be used for connecting to the target address. Note that this is different from the usual gRPC API, which specifies client TLS config via the grpc.WithTransportCredentials. For a plaintext (unencrypted) connection to the server, pass a nil TLS config; however, this does not free you from passing the grpc.WithInsecure() gRPC dial option.

The last (variadic) parameter specifies options that modify the dialing behavior. You can pass any gRPC dial options via client.DialOpts(...); however, the grpc.WithTransportCredentials option will not be needed. By default, adaptive gRPC-Web downgrading is used. To use WebSockets, pass true to the client.UseWebSocket option.

Another important option is client.ForceHTTP2(), which needs to be used for a plaintext connection to a server that is not HTTP/1.1 capable (e.g., the vanilla gRPC server). This option is ignored when WebSockets are used. Again, check out the code in the _integration-tests directory.

Issues
  • use the go-grpc-http with other languages

    use the go-grpc-http with other languages

    Hi , I would like to know if there is any plan to extend this package to be used for a Javascript Client in the browser (Front-end e.g with React) , and for example with a python Server that uses the gRPC standard library?

    opened by H-sin 4
  • Add

    Add "force downgrade" (client) and "prefer downgrade" (server) options

    This adds the following two options to the library:

    • On the client side, ForceDowngrade(true) instructs the client proxy to downgrade all requests by (a) switching to HTTP/1, (b) omitting the Accept: application/grpc header, (c) omitting the TE: trailers header, and (d) sending a special header to request a gRPC-Web response (this is to guard against any overzealous gRPC-aware proxies that might "fix" the issues caused by a-c before forwarding to the backend). The server side is extended to recognize this header.
    • On the server side, PreferGRPCWeb(true) instructs the server to always send a gRPC-Web response when the client indicates that it accepts it and the method is downgradable (i.e., not client- or bidi-streaming).
    opened by misberner 3
  • Bump google.golang.org/grpc from 1.46.0 to 1.46.2

    Bump google.golang.org/grpc from 1.46.0 to 1.46.2

    Bumps google.golang.org/grpc from 1.46.0 to 1.46.2.

    Release notes

    Sourced from google.golang.org/grpc's releases.

    Release v1.46.2

    Bug Fixes

    • client: fix potential panic during RPC retries (#5323)
    • xds: fix leak of deleted CDS resources from CSDS view (#5339)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump github.com/stretchr/testify from 1.5.1 to 1.7.1 in /_integration-tests

    Bump github.com/stretchr/testify from 1.5.1 to 1.7.1 in /_integration-tests

    Bumps github.com/stretchr/testify from 1.5.1 to 1.7.1.

    Release notes

    Sourced from github.com/stretchr/testify's releases.

    Minor improvements and bug fixes

    Minor feature improvements and bug fixes

    Fixes breaking change with HTTPBodyContains

    A breaking change was accidentally released in v1.6.0 which breaks the API for the HTTPBodyContains and HTTPBodyNotContains, this release reverts that change.

    v1.6.0

    Latest release of testify. This includes many fixes and enhancements. Please view the v1.6.0 milestone for a list of changes.

    Commits
    • 083ff1c Fixed didPanic to now detect panic(nil).
    • 1e36bfe Use cross Go version compatible build tag syntax
    • e798dc2 Add docs on 1.17 build tags
    • 83198c2 assert: guard CanConvert call in backward compatible wrapper
    • 087b655 assert: allow comparing time.Time
    • 7bcf74e fix msgAndArgs forwarding
    • c29de71 add tests for correct msgAndArgs forwarding
    • f87e2b2 Update builds
    • ab6dc32 fix linting errors in /assert package
    • edff5a0 fix funtion name
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump google.golang.org/grpc from 1.46.0 to 1.46.2 in /_integration-tests

    Bump google.golang.org/grpc from 1.46.0 to 1.46.2 in /_integration-tests

    Bumps google.golang.org/grpc from 1.46.0 to 1.46.2.

    Release notes

    Sourced from google.golang.org/grpc's releases.

    Release v1.46.2

    Bug Fixes

    • client: fix potential panic during RPC retries (#5323)
    • xds: fix leak of deleted CDS resources from CSDS view (#5339)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump google.golang.org/grpc from 1.45.0 to 1.46.0 in /_integration-tests

    Bump google.golang.org/grpc from 1.45.0 to 1.46.0 in /_integration-tests

    Bumps google.golang.org/grpc from 1.45.0 to 1.46.0.

    Release notes

    Sourced from google.golang.org/grpc's releases.

    Release 1.46.0

    New Features

    • server: Support setting TCP_USER_TIMEOUT on grpc.Server connections using keepalive.ServerParameters.Time (#5219)
    • client: perform graceful switching of LB policies in the ClientConn by default (#5285)
    • all: improve logging by including channelz identifier in log messages (#5192)

    API Changes

    • grpc: delete WithBalancerName() API, deprecated over 4 years ago in #1697 (#5232)
    • balancer: change BuildOptions.ChannelzParentID to an opaque identifier instead of int (#5192)
      • Note: the balancer package is labeled as EXPERIMENTAL, and we don't believe users were using this field.

    Behavior Changes

    • client: change connectivity state to TransientFailure in pick_first LB policy when all addresses are removed (#5274)
      • This is a minor change that brings grpc-go's behavior in line with the intended behavior and how C and Java behave.
    • metadata: add client-side validation of HTTP-invalid metadata before attempting to send (#4886)

    Bug Fixes

    • metadata: make a copy of the value slices in FromContext() functions so that modifications won't be made to the original copy (#5267)
    • client: handle invalid service configs by applying the default, if applicable (#5238)
    • xds: the xds client will now apply a 1 second backoff before recreating ADS or LRS streams (#5280)

    Dependencies

    Commits
    • e8d06c5 Change version to 1.46.0 (#5296)
    • efbd542 gcp/observability: correctly test this module in presubmit tests (#5300) (#5307)
    • 4467a29 gcp/observability: implement logging via binarylog (#5196)
    • 18fdf54 cmd/protoc-gen-go-grpc: allow hooks to modify client structs and service hand...
    • 337b815 interop: build client without timeout; add logs to help debug failures (#5294)
    • e583b19 xds: Add RLS in xDS e2e test (#5281)
    • 0066bf6 grpc: perform graceful switching of LB policies in the ClientConn by defaul...
    • 3cccf6a xdsclient: always backoff between new streams even after successful stream (#...
    • 4e78093 xds: ignore routes with unsupported cluster specifiers (#5269)
    • 99aae34 cluster manager: Add Graceful Switch functionality to Cluster Manager (#5265)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump google.golang.org/grpc from 1.45.0 to 1.46.0

    Bump google.golang.org/grpc from 1.45.0 to 1.46.0

    Bumps google.golang.org/grpc from 1.45.0 to 1.46.0.

    Release notes

    Sourced from google.golang.org/grpc's releases.

    Release 1.46.0

    New Features

    • server: Support setting TCP_USER_TIMEOUT on grpc.Server connections using keepalive.ServerParameters.Time (#5219)
    • client: perform graceful switching of LB policies in the ClientConn by default (#5285)
    • all: improve logging by including channelz identifier in log messages (#5192)

    API Changes

    • grpc: delete WithBalancerName() API, deprecated over 4 years ago in #1697 (#5232)
    • balancer: change BuildOptions.ChannelzParentID to an opaque identifier instead of int (#5192)
      • Note: the balancer package is labeled as EXPERIMENTAL, and we don't believe users were using this field.

    Behavior Changes

    • client: change connectivity state to TransientFailure in pick_first LB policy when all addresses are removed (#5274)
      • This is a minor change that brings grpc-go's behavior in line with the intended behavior and how C and Java behave.
    • metadata: add client-side validation of HTTP-invalid metadata before attempting to send (#4886)

    Bug Fixes

    • metadata: make a copy of the value slices in FromContext() functions so that modifications won't be made to the original copy (#5267)
    • client: handle invalid service configs by applying the default, if applicable (#5238)
    • xds: the xds client will now apply a 1 second backoff before recreating ADS or LRS streams (#5280)

    Dependencies

    Commits
    • e8d06c5 Change version to 1.46.0 (#5296)
    • efbd542 gcp/observability: correctly test this module in presubmit tests (#5300) (#5307)
    • 4467a29 gcp/observability: implement logging via binarylog (#5196)
    • 18fdf54 cmd/protoc-gen-go-grpc: allow hooks to modify client structs and service hand...
    • 337b815 interop: build client without timeout; add logs to help debug failures (#5294)
    • e583b19 xds: Add RLS in xDS e2e test (#5281)
    • 0066bf6 grpc: perform graceful switching of LB policies in the ClientConn by defaul...
    • 3cccf6a xdsclient: always backoff between new streams even after successful stream (#...
    • 4e78093 xds: ignore routes with unsupported cluster specifiers (#5269)
    • 99aae34 cluster manager: Add Graceful Switch functionality to Cluster Manager (#5265)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump google.golang.org/grpc from 1.31.1 to 1.45.0 in /_integration-tests

    Bump google.golang.org/grpc from 1.31.1 to 1.45.0 in /_integration-tests

    Bumps google.golang.org/grpc from 1.31.1 to 1.45.0.

    Release notes

    Sourced from google.golang.org/grpc's releases.

    Release 1.45.0

    Bug Fixes

    • xds/clusterresolver: pass cluster name to DNS child policy to be used in creds handshake (#5119)
    • reflection: support dynamic messages (#5180)

    Performance Improvements

    Behavior Changes

    • server: convert context errors returned by service handlers to status with the correct status code (Canceled or DeadlineExceeded), instead of Unknown (#5156)

    New Features

    • reflection: add NewServer(ServerOptions) for creating a reflection server with advanced customizations (#5197)
    • xds: support federation (#5128)
    • xds/resource: accept Self as LDS's RDS config source and CDS's EDS config source (#5152)
    • xds/bootstrap: add plugin system for credentials specified in bootstrap file (#5136)

    Release 1.44.0

    New Features

    • balancer: add RLS load balancing policy (#5046)
    • xds: add RLS Cluster Specifier Plugin (#5004)
    • insecure: remove experimental notice (#5069)

    Bug Fixes

    • internal/balancergroup: eliminate race in exitIdle (#5012)
    • authz: fix regex expression match (#5035)

    Documentation

    • grpc: minor improvement on WithInsecure() document (#5068)
    • attributes: document that some value types (e.g. maps) must implement Equal (#5109)
    • dialoptions.go: Fix WithBlock godoc (#5073)
    • grpclog.DepthLoggerV2: Correct comment: formats like fmt.Println (#5038)

    Release 1.43.0

    API Changes

    • grpc: stabilize WithConnectParams DialOption (#4915)

    ... (truncated)

    Commits
    • a82cc96 Change version to 1.45.0 (#5202)
    • 011544f authz: add additional logs to sdk authz (#5094)
    • 18564ff reflection: improve server implementation (#5197)
    • ec717ca xds: minor cleanup in xdsclient bootstrap code (#5195)
    • ebc30b8 reflection: use protobuf/reflect instead of go reflection, fix dynamic messag...
    • 46009ac transport: Add an Unwrap method to ConnectionError (#5148)
    • 75fd024 remove sdk term from grpc authz (#5191)
    • a354b1e channelz: rename NewChannelzStorage to NewChannelzStorageForTesting (#5190)
    • 0e05549 Format directory/file references (#5184)
    • c44f627 cleanup: replace grpc.WithInsecure with insecure.NewCredentials (#5177)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump google.golang.org/grpc from 1.31.1 to 1.45.0

    Bump google.golang.org/grpc from 1.31.1 to 1.45.0

    Bumps google.golang.org/grpc from 1.31.1 to 1.45.0.

    Release notes

    Sourced from google.golang.org/grpc's releases.

    Release 1.45.0

    Bug Fixes

    • xds/clusterresolver: pass cluster name to DNS child policy to be used in creds handshake (#5119)
    • reflection: support dynamic messages (#5180)

    Performance Improvements

    Behavior Changes

    • server: convert context errors returned by service handlers to status with the correct status code (Canceled or DeadlineExceeded), instead of Unknown (#5156)

    New Features

    • reflection: add NewServer(ServerOptions) for creating a reflection server with advanced customizations (#5197)
    • xds: support federation (#5128)
    • xds/resource: accept Self as LDS's RDS config source and CDS's EDS config source (#5152)
    • xds/bootstrap: add plugin system for credentials specified in bootstrap file (#5136)

    Release 1.44.0

    New Features

    • balancer: add RLS load balancing policy (#5046)
    • xds: add RLS Cluster Specifier Plugin (#5004)
    • insecure: remove experimental notice (#5069)

    Bug Fixes

    • internal/balancergroup: eliminate race in exitIdle (#5012)
    • authz: fix regex expression match (#5035)

    Documentation

    • grpc: minor improvement on WithInsecure() document (#5068)
    • attributes: document that some value types (e.g. maps) must implement Equal (#5109)
    • dialoptions.go: Fix WithBlock godoc (#5073)
    • grpclog.DepthLoggerV2: Correct comment: formats like fmt.Println (#5038)

    Release 1.43.0

    API Changes

    • grpc: stabilize WithConnectParams DialOption (#4915)

    ... (truncated)

    Commits
    • a82cc96 Change version to 1.45.0 (#5202)
    • 011544f authz: add additional logs to sdk authz (#5094)
    • 18564ff reflection: improve server implementation (#5197)
    • ec717ca xds: minor cleanup in xdsclient bootstrap code (#5195)
    • ebc30b8 reflection: use protobuf/reflect instead of go reflection, fix dynamic messag...
    • 46009ac transport: Add an Unwrap method to ConnectionError (#5148)
    • 75fd024 remove sdk term from grpc authz (#5191)
    • a354b1e channelz: rename NewChannelzStorage to NewChannelzStorageForTesting (#5190)
    • 0e05549 Format directory/file references (#5184)
    • c44f627 cleanup: replace grpc.WithInsecure with insecure.NewCredentials (#5177)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump github.com/stretchr/testify from 1.5.1 to 1.7.1

    Bump github.com/stretchr/testify from 1.5.1 to 1.7.1

    Bumps github.com/stretchr/testify from 1.5.1 to 1.7.1.

    Release notes

    Sourced from github.com/stretchr/testify's releases.

    Minor improvements and bug fixes

    Minor feature improvements and bug fixes

    Fixes breaking change with HTTPBodyContains

    A breaking change was accidentally released in v1.6.0 which breaks the API for the HTTPBodyContains and HTTPBodyNotContains, this release reverts that change.

    v1.6.0

    Latest release of testify. This includes many fixes and enhancements. Please view the v1.6.0 milestone for a list of changes.

    Commits
    • 083ff1c Fixed didPanic to now detect panic(nil).
    • 1e36bfe Use cross Go version compatible build tag syntax
    • e798dc2 Add docs on 1.17 build tags
    • 83198c2 assert: guard CanConvert call in backward compatible wrapper
    • 087b655 assert: allow comparing time.Time
    • 7bcf74e fix msgAndArgs forwarding
    • c29de71 add tests for correct msgAndArgs forwarding
    • f87e2b2 Update builds
    • ab6dc32 fix linting errors in /assert package
    • edff5a0 fix funtion name
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Generate and display more useful error message

    Generate and display more useful error message

    This PR makes multiple changes:

    • It properly encodes the gRPC message that we generate for error responses (the encoding code is copied from the grpc-go source code as it is not exported)
    • It attempts to read some bytes from a text/plain error (>= 400) response in order to provide more useful info for a client.
    • It checks for the Sec-Websocket-Protocol header only to learn about the intent to establish a gRPC-websocket connection, allowing the server to proactively respond with a meaningful error in case the proxy stripped some other relevant websocket headers.
    opened by misberner 0
  • Browser support

    Browser support

    I haven't been able to found more detail, so pardon this question via issue. As this is a websocket solution, this should enable all gRPC features over websocket, including bidirectional / client streaming.

    So, I'd like to ask, are there any browser (JS) client implementation for this implementation of gRPC-WebSocket?

    If there isn't (yet), is there any plan to develop one?

    As modern web frameworks are rapidly evolving and more things can be achieved in-browser, being able to use gRPC in browser would be awesome, as IMO restricting gRPC for server-to-server only is quite a limiting view.

    opened by benedictjohannes 1
Releases(v0.2.4)
Owner
StackRox
StackRox provides security across the container life cycle. Our container security platform reduces the attack surface, ensures compliance, and stops attacks.
StackRox
High-performance, non-blocking, event-driven, easy-to-use networking framework written in Go, support tls/http1.x/websocket.

High-performance, non-blocking, event-driven, easy-to-use networking framework written in Go, support tls/http1.x/websocket.

lesismal 664 May 10, 2022
protoc-gen-grpc-gateway-ts is a Typescript client generator for the grpc-gateway project. It generates idiomatic Typescript clients that connect the web frontend and golang backend fronted by grpc-gateway.

protoc-gen-grpc-gateway-ts protoc-gen-grpc-gateway-ts is a Typescript client generator for the grpc-gateway project. It generates idiomatic Typescript

gRPC Ecosystem 63 May 9, 2022
Http-server - A HTTP server and can be accessed via TLS and non-TLS mode

Application server.go runs a HTTP/HTTPS server on the port 9090. It gives you 4

Vedant Pareek 0 Feb 3, 2022
Access Google Ads API via GRPC

google-ads-pb You can use the golang library to interact with the Google Ads API across grpc. This library is not the official Google Ads API library.

null 7 May 10, 2022
Helps you to send ssh commands to target machine in your local network from outside via gRPC

rpc-ssh In case, you don't want to make your ssh port accessible from outside local network. This repository helps you to send ssh commands to target

Berkay Akyazı 1 Dec 8, 2021
Totem - A Go library that can turn a single gRPC stream into bidirectional unary gRPC servers

Totem is a Go library that can turn a single gRPC stream into bidirectional unar

Joe Kralicky 2 Jan 10, 2022
Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH.

Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH. Single executable including both client and server. Written in Go (golang). Chisel is mainly useful for passing through firewalls, though it can also be used to provide a secure endpoint into your network.

Jaime Pillora 7.2k May 18, 2022
Executing shell commands via HTTP server

shell2http HTTP-server to execute shell commands. Designed for development, prototyping or remote control. Settings through two command line arguments

Sergey Mudrik 927 May 18, 2022
viagh.NewHTTPClient returns a *http.Client that makes API requests via the gh command.

viagh viagh.NewHTTPClient returns a *http.Client that makes API requests via the gh command. Why viagh? When writing a GitHub CLI extension, the exten

Ken’ichiro Oyama 1 Dec 24, 2021
View, edit, and save text files via http to the file system.

go-wiki View, edit, and save text files via http to the file system. (DONE) https://golang.org/doc/articles/wiki/ Instructions go run main.go In a web

Clint Vidler 0 Nov 25, 2021
gproxy is a tiny service/library for creating lets-encrypt/acme secured gRPC and http reverse proxies

gproxy is a reverse proxy service AND library for creating flexible, expression-based, lets-encrypt/acme secured gRPC/http reverse proxies GProxy as a

null 15 Mar 25, 2022
A suite of gRPC debugging tools. Like Fiddler/Charles but for gRPC.

grpc-tools A suite of tools for gRPC debugging and development. Like Fiddler/Charles but for gRPC! The main tool is grpc-dump which transparently inte

Bradley Kemp 1.1k Apr 27, 2022
Server and client implementation of the grpc go libraries to perform unary, client streaming, server streaming and full duplex RPCs from gRPC go introduction

Description This is an implementation of a gRPC client and server that provides route guidance from gRPC Basics: Go tutorial. It demonstrates how to u

Joram Wambugu 0 Nov 24, 2021
Go based grpc - grpc gateway micro service example

go-grpc-gateway-server This repository provides an example for go based microservice. Go micro services developed based on gRPC protobuf's and also us

Suresh Yekasiri 0 Dec 8, 2021
Simple grpc web and grpc transcoding with Envoy

gRPC Web and gRPC Transcoding with Envoy This is a simple stand-alone set of con

null 0 Dec 25, 2021
Go-grpc - This is grpc server for golang.

go-grpc This is grpc server for golang. protocのインストール brew install protoc Golang用のプラグインのインストール go install google.golang.org/protobuf/cmd/protoc-gen-go

jotaro yuza 1 Jan 2, 2022
GRPC - Creating a gRPC service from scratch

#Go gRPC services course Creating a gRPC service from scratch Command line colle

Rafael Diaz Miles 1 Jan 2, 2022
Grpc-gateway-map-null - gRPC Gateway test using nullable values in map

Demonstrate gRPC gateway behavior with nullable values in maps Using grpc-gatewa

null 1 Jan 6, 2022
Todo-app-grpc - Go/GRPC codebase containing RealWorld examples (CRUD, auth, advanced patterns, etc)

Go/GRPC codebase containing RealWorld examples (CRUD, auth, advanced patterns, e

Sammi Aldhi Yanto 2 May 14, 2022