Debian Codegraph @

debian/patches/backport/04-Feat-update-lucas-clemente-quic-go-to-v0.20.0-816.patch

raw
1 From: Loyalsoldier <[email protected]>
2 Date: Mon, 22 Mar 2021 22:26:30 +0800
3 Subject: Feat: update lucas-clemente/quic-go to v0.20.0 (#816)
4
5 (cherry picked from commit f3a56ca090160376e060d906360da45b40883df3)
6 ---
7 app/dns/nameserver_quic.go | 4 ++--
8 transport/internet/quic/dialer.go | 6 +++---
9 transport/internet/quic/hub.go | 2 +-
10 3 files changed, 6 insertions(+), 6 deletions(-)
11
12 diff --git a/app/dns/nameserver_quic.go b/app/dns/nameserver_quic.go
13 index 3001c23..049705e 100644
14 --- a/app/dns/nameserver_quic.go
15 +++ b/app/dns/nameserver_quic.go
16 @@ -27,7 +27,7 @@ import (
17 // by selecting the ALPN token "dq" in the crypto handshake.
18 const NextProtoDQ = "doq-i00"
19
20 -const handshakeTimeout = time.Second * 8
21 +const handshakeIdleTimeout = time.Second * 8
22
23 // QUICNameServer implemented DNS over QUIC
24 type QUICNameServer struct {
25 @@ -362,7 +362,7 @@ func (s *QUICNameServer) getSession() (quic.Session, error) {
26 func (s *QUICNameServer) openSession() (quic.Session, error) {
27 tlsConfig := tls.Config{}
28 quicConfig := &quic.Config{
29 - HandshakeTimeout: handshakeTimeout,
30 + HandshakeIdleTimeout: handshakeIdleTimeout,
31 }
32
33 session, err := quic.DialAddrContext(context.Background(), s.destination.NetAddr(), tlsConfig.GetTLSConfig(tls.WithNextProto("http/1.1", http2.NextProtoTLS, NextProtoDQ)), quicConfig)
34 diff --git a/transport/internet/quic/dialer.go b/transport/internet/quic/dialer.go
35 index daec007..a44af58 100644
36 --- a/transport/internet/quic/dialer.go
37 +++ b/transport/internet/quic/dialer.go
38 @@ -149,9 +149,9 @@ func (s *clientSessions) openConnection(destAddr net.Addr, config *Config, tlsCo
39 }
40
41 quicConfig := &quic.Config{
42 - ConnectionIDLength: 12,
43 - HandshakeTimeout: time.Second * 8,
44 - MaxIdleTimeout: time.Second * 30,
45 + ConnectionIDLength: 12,
46 + HandshakeIdleTimeout: time.Second * 8,
47 + MaxIdleTimeout: time.Second * 30,
48 }
49
50 conn, err := wrapSysConn(rawConn, config)
51 diff --git a/transport/internet/quic/hub.go b/transport/internet/quic/hub.go
52 index 9e49475..dda8ce7 100644
53 --- a/transport/internet/quic/hub.go
54 +++ b/transport/internet/quic/hub.go
55 @@ -105,7 +105,7 @@ func Listen(ctx context.Context, address net.Address, port net.Port, streamSetti
56
57 quicConfig := &quic.Config{
58 ConnectionIDLength: 12,
59 - HandshakeTimeout: time.Second * 8,
60 + HandshakeIdleTimeout: time.Second * 8,
61 MaxIdleTimeout: time.Second * 45,
62 MaxIncomingStreams: 32,
63 MaxIncomingUniStreams: -1,