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

@ -7,7 +7,7 @@ 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"
"github.com/go-gost/x/registry"
)
func init() {

View File

@ -4,6 +4,7 @@ import (
"net/http"
mdata "github.com/go-gost/core/metadata"
mdx "github.com/go-gost/x/metadata"
)
type metadata struct {
@ -17,13 +18,13 @@ func (d *obfsHTTPDialer) parseMetadata(md mdata.Metadata) (err error) {
host = "host"
)
if m := mdata.GetStringMapString(md, header); len(m) > 0 {
if m := mdx.GetStringMapString(md, header); len(m) > 0 {
h := http.Header{}
for k, v := range m {
h.Add(k, v)
}
d.md.header = h
}
d.md.host = mdata.GetString(md, host)
d.md.host = mdx.GetString(md, host)
return
}