diff --git a/common/protocol/quic/qtls_go118.go b/common/protocol/quic/qtls_go118.go new file mode 100644 index 000000000..429037dfc --- /dev/null +++ b/common/protocol/quic/qtls_go118.go @@ -0,0 +1,18 @@ +//go:build go1.18 && !go1.19 + +package quic + +import ( + "crypto/cipher" + + "github.com/quic-go/qtls-go1-18" +) + +type ( + // A CipherSuiteTLS13 is a cipher suite for TLS 1.3 + CipherSuiteTLS13 = qtls.CipherSuiteTLS13 +) + +func AEADAESGCMTLS13(key, fixedNonce []byte) cipher.AEAD { + return qtls.AEADAESGCMTLS13(key, fixedNonce) +} diff --git a/go.mod b/go.mod index d78d882da..2bf198e69 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/v2fly/v2ray-core/v5 -go 1.19 +go 1.18 require ( github.com/adrg/xdg v0.4.0 @@ -16,6 +16,7 @@ require ( github.com/mustafaturan/bus v1.0.2 github.com/pelletier/go-toml v1.9.5 github.com/pires/go-proxyproto v0.6.2 + github.com/quic-go/qtls-go1-18 v0.2.0 github.com/quic-go/qtls-go1-19 v0.2.1 github.com/quic-go/qtls-go1-20 v0.1.1 github.com/quic-go/quic-go v0.32.0 @@ -65,7 +66,6 @@ require ( github.com/pion/udp v0.1.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/quic-go/qtls-go1-18 v0.2.0 // indirect github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect github.com/secure-io/siv-go v0.0.0-20180922214919-5ff40651e2c4 // indirect github.com/xtaci/smux v1.5.15 // indirect