mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-16 12:03:03 +00: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
@ -80,6 +80,7 @@ func Listen(ctx context.Context, address net.Address, port net.Port, settings *i
|
|||||||
var options []grpc.ServerOption
|
var options []grpc.ServerOption
|
||||||
var s *grpc.Server
|
var s *grpc.Server
|
||||||
if config != nil {
|
if config != nil {
|
||||||
|
// gRPC server may silently ignore TLS errors
|
||||||
options = append(options, grpc.Creds(credentials.NewTLS(config.GetTLSConfig(tls.WithNextProto("h2")))))
|
options = append(options, grpc.Creds(credentials.NewTLS(config.GetTLSConfig(tls.WithNextProto("h2")))))
|
||||||
}
|
}
|
||||||
if grpcSettings.IdleTimeout > 0 || grpcSettings.HealthCheckTimeout > 0 {
|
if grpcSettings.IdleTimeout > 0 || grpcSettings.HealthCheckTimeout > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user