1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 01:57:12 -05:00

add comment for gRPC TLS silent failure behavior

When gRPC transport have been configured to use TLS, it may silently ignore TLS failure. This may make it harder to diagnose TLS setting issues when gRPC transport is used. This comment is added to help other developers be aware of this caveat.
This commit is contained in:
Shelikhoo 2021-09-03 21:34:34 +01:00
parent 84918fbaac
commit ebdacfdb86
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316

View File

@ -75,6 +75,7 @@ func Listen(ctx context.Context, address net.Address, port net.Port, settings *i
if config == nil { if config == nil {
s = grpc.NewServer() s = grpc.NewServer()
} else { } else {
// gRPC server may silently ignore TLS errors
s = grpc.NewServer(grpc.Creds(credentials.NewTLS(config.GetTLSConfig(tls.WithNextProto("h2"))))) s = grpc.NewServer(grpc.Creds(credentials.NewTLS(config.GetTLSConfig(tls.WithNextProto("h2")))))
} }
listener.s = s listener.s = s