mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-15 09:19:21 +02:00
feat: change the handshake timeout of quic to default vaule
This commit is contained in:
parent
d3533abe3c
commit
7a778d74d0
|
@ -27,8 +27,6 @@ import (
|
||||||
// by selecting the ALPN token "dq" in the crypto handshake.
|
// by selecting the ALPN token "dq" in the crypto handshake.
|
||||||
const NextProtoDQ = "doq-i00"
|
const NextProtoDQ = "doq-i00"
|
||||||
|
|
||||||
const handshakeTimeout = time.Second * 8
|
|
||||||
|
|
||||||
// QUICNameServer implemented DNS over QUIC
|
// QUICNameServer implemented DNS over QUIC
|
||||||
type QUICNameServer struct {
|
type QUICNameServer struct {
|
||||||
sync.RWMutex
|
sync.RWMutex
|
||||||
|
@ -373,9 +371,7 @@ func (s *QUICNameServer) getSession() (quic.Session, error) {
|
||||||
|
|
||||||
func (s *QUICNameServer) openSession() (quic.Session, error) {
|
func (s *QUICNameServer) openSession() (quic.Session, error) {
|
||||||
tlsConfig := tls.Config{}
|
tlsConfig := tls.Config{}
|
||||||
quicConfig := &quic.Config{
|
quicConfig := &quic.Config{}
|
||||||
HandshakeTimeout: handshakeTimeout,
|
|
||||||
}
|
|
||||||
|
|
||||||
session, err := quic.DialAddrContext(context.Background(), s.destination.NetAddr(), tlsConfig.GetTLSConfig(tls.WithNextProto("http/1.1", http2.NextProtoTLS, NextProtoDQ)), quicConfig)
|
session, err := quic.DialAddrContext(context.Background(), s.destination.NetAddr(), tlsConfig.GetTLSConfig(tls.WithNextProto("http/1.1", http2.NextProtoTLS, NextProtoDQ)), quicConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue