internal/server: set quic to protocol version 39
This commit is contained in:
parent
90536c6ec0
commit
d16b00a1a4
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue