Remove TLS requirement for gRPC client

This commit is contained in:
Hellojack authored and 世界 committed 2023-04-21 17:48:29 +08:00
1 parent 3a92bf993d
commit ec2d0b6b3c
5 files changed
+42 -38

No files matched your search

+3 -1
View File
@@ -43,7 +43,9 @@ func NewClient(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, opt
},
}
} else {
tlsConfig.SetNextProtos([]string{http2.NextProtoTLS})
if len(tlsConfig.NextProtos()) == 0 {
tlsConfig.SetNextProtos([]string{http2.NextProtoTLS})
}
transport = &http2.Transport{
ReadIdleTimeout: time.Duration(options.IdleTimeout),
PingTimeout: time.Duration(options.PingTimeout),