Skip to content

Commit

Permalink
Compatibility change for go 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
moetayuko authored and xiaokangwang committed Feb 18, 2023
1 parent 179cd1d commit 0dcf8ca
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions common/protocol/quic/qtls_go118.go
Original file line number Diff line number Diff line change
@@ -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)
}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0dcf8ca

Please sign in to comment.