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

@ -15,9 +15,9 @@ import (
"github.com/go-gost/core/handler"
"github.com/go-gost/core/logger"
md "github.com/go-gost/core/metadata"
"github.com/go-gost/core/registry"
"github.com/go-gost/x/internal/util/ss"
tap_util "github.com/go-gost/x/internal/util/tap"
"github.com/go-gost/x/registry"
"github.com/shadowsocks/go-shadowsocks2/core"
"github.com/shadowsocks/go-shadowsocks2/shadowaead"
"github.com/songgao/water/waterutil"

View File

@ -2,6 +2,7 @@ package tap
import (
mdata "github.com/go-gost/core/metadata"
mdx "github.com/go-gost/x/metadata"
)
type metadata struct {
@ -15,8 +16,8 @@ func (h *tapHandler) parseMetadata(md mdata.Metadata) (err error) {
bufferSize = "bufferSize"
)
h.md.key = mdata.GetString(md, key)
h.md.bufferSize = mdata.GetInt(md, bufferSize)
h.md.key = mdx.GetString(md, key)
h.md.bufferSize = mdx.GetInt(md, bufferSize)
if h.md.bufferSize <= 0 {
h.md.bufferSize = 1500
}