|
@@ -11,7 +11,6 @@ import (
|
|
|
|
|
|
|
|
"github.com/quic-go/quic-go"
|
|
"github.com/quic-go/quic-go"
|
|
|
"golang.org/x/net/dns/dnsmessage"
|
|
"golang.org/x/net/dns/dnsmessage"
|
|
|
- "golang.org/x/net/http2"
|
|
|
|
|
|
|
|
|
|
"github.com/v2fly/v2ray-core/v5/common"
|
|
"github.com/v2fly/v2ray-core/v5/common"
|
|
|
"github.com/v2fly/v2ray-core/v5/common/buf"
|
|
"github.com/v2fly/v2ray-core/v5/common/buf"
|
|
@@ -25,7 +24,7 @@ import (
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
// NextProtoDQ - During connection establishment, DNS/QUIC support is indicated
|
|
// NextProtoDQ - During connection establishment, DNS/QUIC support is indicated
|
|
|
-// by selecting the ALPN token "dq" in the crypto handshake.
|
|
|
|
|
|
|
+// by selecting the ALPN token "doq" in the crypto handshake.
|
|
|
const NextProtoDQ = "doq"
|
|
const NextProtoDQ = "doq"
|
|
|
|
|
|
|
|
const handshakeIdleTimeout = time.Second * 8
|
|
const handshakeIdleTimeout = time.Second * 8
|
|
@@ -383,7 +382,7 @@ func (s *QUICNameServer) openConnection(ctx context.Context) (quic.Connection, e
|
|
|
HandshakeIdleTimeout: handshakeIdleTimeout,
|
|
HandshakeIdleTimeout: handshakeIdleTimeout,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- conn, err := quic.DialAddrContext(ctx, s.destination.NetAddr(), tlsConfig.GetTLSConfig(tls.WithNextProto("http/1.1", http2.NextProtoTLS, NextProtoDQ)), quicConfig)
|
|
|
|
|
|
|
+ conn, err := quic.DialAddrContext(ctx, s.destination.NetAddr(), tlsConfig.GetTLSConfig(tls.WithNextProto(NextProtoDQ)), quicConfig)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return nil, err
|
|
return nil, err
|
|
|
}
|
|
}
|