diff --git a/go.mod b/go.mod index bd2fc11..acf3d69 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/sagernet/sing-shadowsocks go 1.18 require ( - github.com/sagernet/sing v0.0.0-20220616051325-90beb46c6d22 + github.com/sagernet/sing v0.0.0-20220617062129-c6eb392ecb43 golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e lukechampine.com/blake3 v1.1.7 ) diff --git a/go.sum b/go.sum index 954bfce..e4d7bdf 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,8 @@ github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.12 h1:p9dKCg8i4gmOxtv35DvrYoWqYzQrvEVdjQ762Y0OqZE= github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= -github.com/sagernet/sing v0.0.0-20220616051325-90beb46c6d22 h1:9qQB2pN/p6jI8vrCEy/KOvjuvEgoaz6QNIX7BgPhwSw= -github.com/sagernet/sing v0.0.0-20220616051325-90beb46c6d22/go.mod h1:I67R/q5f67xDExL2kL3RLIP7kGJBOPkYXkpRAykgC+E= +github.com/sagernet/sing v0.0.0-20220617062129-c6eb392ecb43 h1:fgG3GGs1pi72+5WWL0WIy+fQY6E1dBkGkH0UQ3zw+DI= +github.com/sagernet/sing v0.0.0-20220617062129-c6eb392ecb43/go.mod h1:I67R/q5f67xDExL2kL3RLIP7kGJBOPkYXkpRAykgC+E= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= diff --git a/shadowaead_2022/encrypted_stream.go b/shadowaead_2022/encrypted_stream.go index 1b4fab2..90abf32 100644 --- a/shadowaead_2022/encrypted_stream.go +++ b/shadowaead_2022/encrypted_stream.go @@ -29,7 +29,7 @@ func isTLSHandshake(payload []byte) bool { return false } tlsVersion := binary.BigEndian.Uint16(payload[1:]) - if tlsVersion < tlsVersion10 || tlsVersion > tlsVersion13 { + if tlsVersion != tlsVersion10 && tlsVersion != tlsVersion12 { return false } return true