mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-22 08:31:30 +00:00
Fix missing default shadowtls version
This commit is contained in:
parent
3688f2e114
commit
a88820af31
|
@ -32,6 +32,10 @@ func NewShadowTLS(ctx context.Context, router adapter.Router, logger log.Context
|
|||
},
|
||||
}
|
||||
|
||||
if options.Version == 0 {
|
||||
options.Version = 1
|
||||
}
|
||||
|
||||
var handshakeForServerName map[string]shadowtls.HandshakeConfig
|
||||
if options.Version > 1 {
|
||||
handshakeForServerName = make(map[string]shadowtls.HandshakeConfig)
|
||||
|
|
|
@ -37,6 +37,11 @@ func NewShadowTLS(ctx context.Context, router adapter.Router, logger log.Context
|
|||
if options.TLS == nil || !options.TLS.Enabled {
|
||||
return nil, C.ErrTLSRequired
|
||||
}
|
||||
|
||||
if options.Version == 0 {
|
||||
options.Version = 1
|
||||
}
|
||||
|
||||
if options.Version == 1 {
|
||||
options.TLS.MinVersion = "1.2"
|
||||
options.TLS.MaxVersion = "1.2"
|
||||
|
|
Loading…
Reference in a new issue