add pkgs from core

This commit is contained in:
ginuerzh
2022-04-04 12:44:35 +08:00
parent 7eb3687e0e
commit a3346ad246
188 changed files with 6084 additions and 283 deletions

View File

@ -11,8 +11,8 @@ import (
"github.com/go-gost/core/dialer"
"github.com/go-gost/core/logger"
md "github.com/go-gost/core/metadata"
"github.com/go-gost/core/registry"
icmp_pkg "github.com/go-gost/x/internal/util/icmp"
"github.com/go-gost/x/registry"
"github.com/lucas-clemente/quic-go"
"golang.org/x/net/icmp"
)

View File

@ -4,6 +4,7 @@ import (
"time"
mdata "github.com/go-gost/core/metadata"
mdx "github.com/go-gost/x/metadata"
)
type metadata struct {
@ -19,11 +20,11 @@ func (d *icmpDialer) parseMetadata(md mdata.Metadata) (err error) {
maxIdleTimeout = "maxIdleTimeout"
)
d.md.handshakeTimeout = mdata.GetDuration(md, handshakeTimeout)
d.md.handshakeTimeout = mdx.GetDuration(md, handshakeTimeout)
d.md.keepAlive = mdata.GetBool(md, keepAlive)
d.md.handshakeTimeout = mdata.GetDuration(md, handshakeTimeout)
d.md.maxIdleTimeout = mdata.GetDuration(md, maxIdleTimeout)
d.md.keepAlive = mdx.GetBool(md, keepAlive)
d.md.handshakeTimeout = mdx.GetDuration(md, handshakeTimeout)
d.md.maxIdleTimeout = mdx.GetDuration(md, maxIdleTimeout)
return
}