diff --git a/inbound/shadowtls.go b/inbound/shadowtls.go index 21028e05..cd7a4db8 100644 --- a/inbound/shadowtls.go +++ b/inbound/shadowtls.go @@ -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) diff --git a/outbound/shadowtls.go b/outbound/shadowtls.go index 616a4baf..7e06f166 100644 --- a/outbound/shadowtls.go +++ b/outbound/shadowtls.go @@ -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"