From d16b00a1a4906d910a22b30fc1f6f547607e5b65 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Mon, 11 Dec 2017 18:57:09 -0800 Subject: [PATCH] internal/server: set quic to protocol version 39 --- internal/server/server.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/internal/server/server.go b/internal/server/server.go index 5c25a93..8d0d93d 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -7,14 +7,12 @@ import ( "net" "net/http" "net/http/httputil" - "strings" "time" "git.xeserv.us/xena/route/internal/database" "git.xeserv.us/xena/route/internal/tun2" proto "git.xeserv.us/xena/route/proto" "github.com/Xe/ln" - "github.com/lucas-clemente/quic-go/protocol" "github.com/mtneug/pkg/ulid" kcp "github.com/xtaci/kcp-go" "golang.org/x/crypto/acme/autocert" @@ -169,13 +167,7 @@ func (s *Server) Director(r *http.Request) { r.Header.Del("X-Forwarded-For") r.Header.Del("X-Client-Ip") - var versions []string - for _, v := range protocol.SupportedVersions { - versions = append(versions, v.ToAltSvc()) - } - versionsStr := strings.Join(versions, ",") - - r.Header.Add("Alt-Svc", fmt.Sprintf(`quic="%s"; ma=2592000; v="%s"`, s.cfg.QuicAddr, versionsStr)) + r.Header.Add("Alt-Svc", fmt.Sprintf(`quic="%s"; ma=2592000; v="39"`, s.cfg.QuicAddr)) } func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {