How to use go-grpc-http1 behind a TLS?
Hi, I am trying to use go-grpc-http1 with a TLS server in HTTP/1 in the following way: client-tls.go.txt server-tls.go.txt
The server seems to run alright:
$ ./server-tls
2024/12/19 22:01:44 INFO: [core] [Server #1]Server created
2024/12/19 22:01:44 Server is listening on :8443 with TLS over HTTP/1.1
However, when I try to run the client, I get:
2024/12/19 22:10:59 Failed to call SayHello: rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: tls: first record does not look like a TLS handshake"
Running the curl command with the custom CA passes with flying colors:
curl -v --cacert cert.pem https://localhost:8443 >& curl.txt
What could be the reason? am I initializing the client correctly?
Thanks, Ofir
We (@ulexus) also hit this; are we passing the arguments wrong?
hey there, I've hacked together a repo that allows me to use this behind IAP, which requires TLS; here's the repo, https://github.com/antholeole/grpc-over-iap and here's the code that puts it behind TLS - https://github.com/antholeole/grpc-over-iap/blob/wip/grpc_client.go#L65-L87
pretty involved but it can be done :)