Commit Graph

13 Commits

Author SHA1 Message Date
Yusuke KUOKA d37571c559 Allow passing :authority pseudo header
So that you inform reverse proxy servers to use it for routing.
Tested with nginx/1.13.12, which is the latest release of nginx as of today.

Usage: `grpcurl --authority example.com localhost`

See https://github.com/grpc/grpc-go/pull/1064 for the PR to grpc-go which enabled this feature.
See https://tools.ietf.org/html/rfc7540#section-8.1.2.3 and https://tools.ietf.org/html/rfc3986#section-3.2 for what is a valid :authority header value.

Note that `grpcurl -H ':authority: example.com' localhost` doesn't work in two ways.

One is that the current implementation of grpcurl splits `:authority: example.com` to `[]string{"", "authority: example}` and considers it as a header with an empty key and a value of "authority: example.com" which isn't valid.

Another one is that `-H` passes request metadata, whereas `:authority` header must be provided at connection time.
2018-05-24 22:27:07 +09:00
Joshua Humphries ec219b3c15
allow the use of proto source files directly, instead of having to compile to protoset files (#32) 2018-05-23 14:13:24 -04:00
Josh Humphries e6ac789274 grpclog.Printf deprecated; use Info instead 2018-05-08 10:08:35 -04:00
Joshua Humphries ca5693f42c
support unix sockets (#26) 2018-03-27 11:24:35 -04:00
Joshua Humphries 224c3acd1d
enable more linters in CI; fix some issues caught by them (#23) 2018-03-24 10:33:21 -04:00
Johannes Kohnen f203c2cddf Flag to override server name when validating TLS cert (#20) 2018-03-22 20:47:51 -04:00
Joshua Humphries 585cd1bae8
print summary message only when verbose flag is set (#19) 2018-03-13 16:49:09 -04:00
Joshua Humphries f7eb17819d
add more control over request metadata; add message templates (#17)
* add more control over request metadata between reflection calls and main RPC invocation
* add flag to print a message template (when describing message types)
* relax some command-line argument issues to warnings
2018-03-08 11:29:06 -05:00
Frederik 99a3346b94 Allow reflection calls to carry headers (#15) 2018-03-02 12:01:37 -05:00
Peter Edge ceba64b971 Delete references to json.RawMessage (#12) 2018-02-20 15:03:05 -05:00
Stephan Renatus 7d304729b4 make jsonpb marshaler emit defaults (#3)
add `-emit-defaults` flag so that output will include default values (e.g. "false" for boolean flags)
2018-02-05 10:52:29 -05:00
Josh Humphries 6c05311fb9 use custom dialer so we can show better error messages when things like TLS handshakes go awry; restore error message checks in tls tests 2017-12-13 15:30:57 -05:00
Josh Humphries 9dfaded6cf initial commit, functioning grpcurl command-line util 2017-11-20 13:15:15 -05:00