add pkgs from core
This commit is contained in:
@ -8,8 +8,8 @@ import (
|
||||
"github.com/go-gost/core/logger"
|
||||
md "github.com/go-gost/core/metadata"
|
||||
metrics "github.com/go-gost/core/metrics/wrapper"
|
||||
"github.com/go-gost/core/registry"
|
||||
quic_util "github.com/go-gost/x/internal/util/quic"
|
||||
"github.com/go-gost/x/registry"
|
||||
"github.com/lucas-clemente/quic-go"
|
||||
)
|
||||
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"time"
|
||||
|
||||
mdata "github.com/go-gost/core/metadata"
|
||||
mdx "github.com/go-gost/x/metadata"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -29,18 +30,18 @@ func (l *quicListener) parseMetadata(md mdata.Metadata) (err error) {
|
||||
cipherKey = "cipherKey"
|
||||
)
|
||||
|
||||
l.md.backlog = mdata.GetInt(md, backlog)
|
||||
l.md.backlog = mdx.GetInt(md, backlog)
|
||||
if l.md.backlog <= 0 {
|
||||
l.md.backlog = defaultBacklog
|
||||
}
|
||||
|
||||
if key := mdata.GetString(md, cipherKey); key != "" {
|
||||
if key := mdx.GetString(md, cipherKey); key != "" {
|
||||
l.md.cipherKey = []byte(key)
|
||||
}
|
||||
|
||||
l.md.keepAlive = mdata.GetBool(md, keepAlive)
|
||||
l.md.handshakeTimeout = mdata.GetDuration(md, handshakeTimeout)
|
||||
l.md.maxIdleTimeout = mdata.GetDuration(md, maxIdleTimeout)
|
||||
l.md.keepAlive = mdx.GetBool(md, keepAlive)
|
||||
l.md.handshakeTimeout = mdx.GetDuration(md, handshakeTimeout)
|
||||
l.md.maxIdleTimeout = mdx.GetDuration(md, maxIdleTimeout)
|
||||
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user