mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-24 08:26:58 -04:00
update quic-go to v0.13.0 (#2862)
This version supports IETF QUIC draft-23.
This commit is contained in:
committed by
Matt Holt
parent
3f9a431100
commit
aa94f2b802
@@ -35,13 +35,13 @@ import (
|
||||
"github.com/caddyserver/caddy/caddyhttp/staticfiles"
|
||||
"github.com/caddyserver/caddy/caddytls"
|
||||
"github.com/caddyserver/caddy/telemetry"
|
||||
"github.com/lucas-clemente/quic-go/h2quic"
|
||||
"github.com/lucas-clemente/quic-go/http3"
|
||||
)
|
||||
|
||||
// Server is the HTTP server implementation.
|
||||
type Server struct {
|
||||
Server *http.Server
|
||||
quicServer *h2quic.Server
|
||||
quicServer *http3.Server
|
||||
sites []*SiteConfig
|
||||
connTimeout time.Duration // max time to wait for a connection before force stop
|
||||
tlsGovChan chan struct{} // close to stop the TLS maintenance goroutine
|
||||
@@ -104,7 +104,7 @@ func NewServer(addr string, group []*SiteConfig) (*Server, error) {
|
||||
if s.Server.TLSConfig != nil {
|
||||
// enable QUIC if desired (requires HTTP/2)
|
||||
if HTTP2 && QUIC {
|
||||
s.quicServer = &h2quic.Server{Server: s.Server}
|
||||
s.quicServer = &http3.Server{Server: s.Server}
|
||||
s.Server.Handler = s.wrapWithSvcHeaders(s.Server.Handler)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user