UTLS兼容

This commit is contained in:
wenyifan
2026-06-28 12:08:30 +08:00
parent f63f36805b
commit 3993c95700
9 changed files with 305 additions and 17 deletions
+5 -1
View File
@@ -5,8 +5,8 @@ import (
"time"
mdata "github.com/go-gost/core/metadata"
mdutil "github.com/go-gost/x/metadata/util"
"github.com/go-gost/x/internal/util/mux"
mdutil "github.com/go-gost/x/metadata/util"
)
const (
@@ -18,6 +18,8 @@ type metadata struct {
host string
path string
useH2 bool
handshakeTimeout time.Duration
readHeaderTimeout time.Duration
readBufferSize int
@@ -77,5 +79,7 @@ func (d *mwsDialer) parseMetadata(md mdata.Metadata) (err error) {
d.md.tcpKeepaliveInterval = mdutil.GetDuration(md, "tcp.keepalive.interval")
d.md.tcpKeepaliveCount = mdutil.GetInt(md, "tcp.keepalive.count")
d.md.useH2 = mdutil.GetBool(md, "h2")
return
}