UTLS兼容
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user