diff --git a/proxy/quic/client.go b/proxy/quic/client.go index b1662e8..6a7cd48 100644 --- a/proxy/quic/client.go +++ b/proxy/quic/client.go @@ -16,11 +16,12 @@ type client struct { func NewClient() *client { return &client{ - // conf: &quic.Config{ - // HandshakeTimeout: 5 * time.Second, - // MaxIncomingStreams: 1024, - // KeepAlive: true, - // }, + conf: &quic.Config{ + HandshakeTimeout: 5 * time.Second, + MaxIncomingStreams: 1024, + KeepAlive: true, + IdleTimeout: 30 * time.Second, + }, } } diff --git a/proxy/quic/server.go b/proxy/quic/server.go index b6fcdb2..56a095d 100644 --- a/proxy/quic/server.go +++ b/proxy/quic/server.go @@ -2,6 +2,7 @@ package quic import ( "net" + "time" "github.com/golang/glog" quic "github.com/lucas-clemente/quic-go" @@ -14,11 +15,12 @@ type server struct { func NewServer() *server { return &server{ - // conf: &quic.Config{ - // HandshakeTimeout: 5 * time.Second, - // MaxIncomingStreams: 1024, - // KeepAlive: true, - // }, + conf: &quic.Config{ + HandshakeTimeout: 5 * time.Second, + MaxIncomingStreams: 1024, + KeepAlive: true, + IdleTimeout: 30 * time.Second, + }, } }