diff --git a/transport/v2rayquic/client.go b/transport/v2rayquic/client.go index f5184615..44455e2f 100644 --- a/transport/v2rayquic/client.go +++ b/transport/v2rayquic/client.go @@ -8,6 +8,7 @@ import ( "sync" "github.com/sagernet/quic-go" + "github.com/sagernet/quic-go/http3" "github.com/sagernet/sing-box/adapter" "github.com/sagernet/sing-box/common/tls" C "github.com/sagernet/sing-box/constant" @@ -37,7 +38,7 @@ func NewClient(ctx context.Context, dialer N.Dialer, serverAddr M.Socksaddr, opt DisablePathMTUDiscovery: !C.IsLinux && !C.IsWindows, } if len(tlsConfig.NextProtos()) == 0 { - tlsConfig.SetNextProtos([]string{"h2", "http/1.1"}) + tlsConfig.SetNextProtos([]string{http3.NextProtoH3}) } return &Client{ ctx: ctx, diff --git a/transport/v2rayquic/server.go b/transport/v2rayquic/server.go index 0ef8d2a1..f7721030 100644 --- a/transport/v2rayquic/server.go +++ b/transport/v2rayquic/server.go @@ -8,6 +8,7 @@ import ( "os" "github.com/sagernet/quic-go" + "github.com/sagernet/quic-go/http3" "github.com/sagernet/sing-box/adapter" "github.com/sagernet/sing-box/common/tls" C "github.com/sagernet/sing-box/constant" @@ -34,7 +35,7 @@ func NewServer(ctx context.Context, options option.V2RayQUICOptions, tlsConfig t DisablePathMTUDiscovery: !C.IsLinux && !C.IsWindows, } if len(tlsConfig.NextProtos()) == 0 { - tlsConfig.SetNextProtos([]string{"h2", "http/1.1"}) + tlsConfig.SetNextProtos([]string{http3.NextProtoH3}) } server := &Server{ ctx: ctx,