mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 11:23:32 +02:00
add comment for gRPC TLS silent failure behavior (#779)
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. Co-authored-by: Shelikhoo <xiaokangwang@outlook.com>
This commit is contained in:
parent
3bf3d96472
commit
c4fc277758
1 changed files with 1 additions and 0 deletions
|
@ -80,6 +80,7 @@ func Listen(ctx context.Context, address net.Address, port net.Port, settings *i
|
|||
var options []grpc.ServerOption
|
||||
var s *grpc.Server
|
||||
if config != nil {
|
||||
// gRPC server may silently ignore TLS errors
|
||||
options = append(options, grpc.Creds(credentials.NewTLS(config.GetTLSConfig(tls.WithNextProto("h2")))))
|
||||
}
|
||||
if grpcSettings.IdleTimeout > 0 || grpcSettings.HealthCheckTimeout > 0 {
|
||||
|
|
Loading…
Reference in a new issue